Run it
Copy the script and paste it into your executor.
.UhhhhhhLoaded
.UhhhhhhLoaded =
UhhhhhhVersion =
Debris = (:())
CoreGui = (:())
Players = (:())
VRService = (:())
RunService = (:())
StarterGui = (:())
GuiService = (:())
HttpService = (:())
TextService = (:())
TweenService = (:())
TextChatService = (:())
UserInputService = (:())
AvatarEditorService = (:())
ContextActionService = (:())
Util = {}
Util.RandomString = (length)
length = length .(, )
str =
_=, length
str ..= .(.(, ))
str
Util.DeepcopyTable = (t)
c = {}
k, v (t)
(v) ==
v = Util.(v)
c[k] = v
c
Util.Notify = (text)
StarterGui:(, {
Title = ,
Text = text,
Duration =
})
cloneref = cloneref (o) o
getcustomasset = getcustomasset getsynasset
gethiddengui = get_hidden_gui gethui
= ( .request)
(func)
func (func) ~=
(msg)
Util.( .. msg)
.UhhhhhhLoaded =
()
()
()
(getcustomasset)
()
(readfile)
(writefile)
(delfile)
(isfile)
(isfolder)
(makefolder)
(listfiles)
()
()
()
(gethiddenproperty)
(setscriptable)
()
(isscriptable)
gethiddenproperty = (inst, prop, val)
(inst, prop, )
val = inst[prop]
(inst, prop, )
val
gethiddenproperty = (inst, prop, val)
was = (inst, prop)
was (inst, prop, )
val = inst[prop]
was (inst, prop, )
val
(sethiddenproperty)
(setscriptable)
()
(isscriptable)
sethiddenproperty = (inst, prop, val)
(inst, prop, )
inst[prop] = val
(inst, prop, )
gethiddenproperty = (inst, prop, val)
was = (inst, prop)
was (inst, prop, )
inst[prop] = val
was (inst, prop, )
loadstringreturn =
val = .(-, )
_, func = (, .. val)
func
s, val2 = (func)
s val == val2
loadstringreturn =
loadstringreturn
()
(isfile)
s, e = (isfile, Util.())
s e
isfile = (path)
s, e = (readfile, path)
(s e)
()
= (func, ...)
((...)
(...)
, ...)
= (func, ...)
((...)
(...)
, ...)
b_getfenv = getfenv
Player = Players.LocalPlayer
RealCharGetter = () Player.Character
() ()
RealEventGetter = (name) Player[name]
(name) (name)
:()
notLoaded = .()
(()
notLoaded.Parent = CoreGui
, ()
notLoaded.Parent =
)
notLoaded.Text =
.Loaded:()
i=,
.() > /
notLoaded:()
Camera = .CurrentCamera
:():(()
newCamera = .CurrentCamera
newCamera ~=
Camera = newCamera
)
Util._scrsiz = .(, )
Util.GetScreenSize = ()
Camera ~=
Util._scrsiz = Camera.ViewportSize
Util._scrsiz
Util.LoopedHSV = (h, s, v)
h %=
s = .(s, , )
v = .(v, , )
.(h, s, v)
Util.Instance = (cl, p)
i = .(cl)
i.Name = Util.()
i.Parent = p
i
Util.LinkDestroyI2C = (a, b)
a.Destroying:(()
b:()
)
Util.LinkDestroyI2I = (a, b)
Util.(b, a.Destroying:(()
.(b.Destroy, b)
))
Util.ClearAllChildrenGui = (a)
_,v a:()
v:()
v:()
Util.GetTransparency = (part)
- ( - part.Transparency) * ( - part.LocalTransparencyModifier)
Util.ScaleCFrame = (cf, scale)
cf + cf.Position * (scale - )
Util.IsGuiVisible = (guiObject)
guiObject guiObject:()
guiObject
guiObject.Visible
guiObject = guiObject:()
Util.IsGuiInteractable = (guiObject)
guiObject guiObject:()
guiObject
guiObject.Visible guiObject.Interactable
guiObject = guiObject:()
Util.WillGuiSinkInput = (guiObject)
Util.(guiObject) (guiObject.Active guiObject:())
Util.UDim2ToVector2Scale = (x)
.(x.X.Scale, x.Y.Scale)
Util.UDim2ToVector2Offset = (x)
.(x.X.Offset, x.Y.Offset)
Util.Vector2ToUDim2Scale = (x)
.(x.X, x.Y)
Util.Vector2ToUDim2Offset = (x)
.(x.X, x.Y)
Util.ForceTextSize = (inst)
inst:()
original = inst.TextSize
conn conn = RunService.PreRender:(()
size = GuiService.PreferredTextSize.Name
size ==
inst.TextSize = original
size ==
inst.TextSize = original -
size ==
inst.TextSize = original -
size ==
inst.TextSize = original -
)
Util.(inst, conn)
Util.QueryPlayerSelector = (query, excludespeaker)
#query ==
query = query:()
t = {}
_,player Players:()
player ~= Player excludespeaker
a = player.DisplayName:():(query)
b = player.Name:():(query)
a .(t, {player, , a})
b .(t, {player, , b})
.(t, (a, b)
a[] == b[]
a[] < b[]
a[] < b[]
)
t[]
t[][]
IsUhhhhhhFullyLoaded =
SCREENGUI = Util.()
SCREENGUI.IgnoreGuiInset =
SCREENGUI.ZIndexBehavior = .ZIndexBehavior.Sibling
SCREENGUI.ClipToDeviceSafeArea =
SCREENGUI.ResetOnSpawn =
SCREENGUI.ScreenInsets = .ScreenInsets.None
SCREENGUI.DisplayOrder =
gethiddengui
SCREENGUI.Parent = ()
SCREENGUI.Parent = CoreGui
SCREENGUI.Enabled =
UIMainFrame = Util.(, SCREENGUI)
UIMainFrame.AnchorPoint = .(, )
UIMainFrame.Position = .(, , , )
UIMainFrame.Size = .(, , , )
UIMainFrame.BackgroundColor3 = .(, , )
UIMainFrame.BackgroundTransparency =
UIMainFrame.BorderSizePixel =
UIMainFrame.ZIndex =
SaveData = {}
(makefolder, )
(writefile, , )
SaveDataFilename =
s, data = (readfile, SaveDataFilename)
s data
s, data = (HttpService.JSONDecode, HttpService, data)
s data
SaveData = data
(writefile, SaveDataFilename, )
(writefile, SaveDataFilename, )
.(()
odata =
savefailwarn =
.()
s, data = (HttpService.JSONEncode, HttpService, SaveData)
s
odata = odata data
odata ~= data
s, err = (writefile, SaveDataFilename, data)
s
savefailwarn =
odata = data
savefailwarn
Util.()
savefailwarn =
.()
savefailwarn
Util.()
savefailwarn =
)
(makefolder, )
(makefolder, )
(makefolder, )
(makefolder, )
(makefolder, )
(makefolder, )
(makefolder, )
(makefolder, )
(makefolder, )
(makefolder, )
CDNVersion =
AllFileNames = {
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
}
redownloadeverything = SaveData.CDNVersion ~= CDNVersion
theresassetsmissing = redownloadeverything
_,rfile AllFileNames
fil = .. rfile
s, d = (isfile, fil)
(s d)
theresassetsmissing =
theresassetsmissing
downloaded =
skipped =
assetsdownload =
downloadfile = (meta)
fil = .. meta.name
redownloadeverything
s, d = (isfile, fil)
s d
downloaded +=
(()
(fil, :(meta.download_url))
) skipped +=
downloaded +=
Downloading = Util.(, UIMainFrame)
Downloading.AnchorPoint = .(, )
Downloading.Position = .(, , , )
Downloading.Size = .(, , , )
Downloading.BackgroundColor3 = .(, , )
Downloading.BackgroundTransparency =
Downloading.ClipsDescendants =
Downloading.BorderSizePixel =
Downloading.TextColor3 = .(, , )
Downloading.TextSize =
Downloading.Font = .Font.Code
Downloading.Text =
Util.(Downloading)
TweenService:(Downloading, TweenInfo.(), {
Size = .(, , , )
}):()
.()
s, assetsof = (.HttpGet, , )
s assetsof
s, assetsof = (HttpService.JSONDecode, HttpService, assetsof)
s assetsof
i,file assetsof
.(AllFileNames, file.name)
assetsdownload +=
.(downloadfile, file)
Downloading.Text =
Downloading.BackgroundColor3 = .(, , )
.()
downloaded == assetsdownload
Downloading.Text =
Downloading.BackgroundColor3 = .(, , )
theresassetsmissing =
SaveData.CDNVersion = CDNVersion
theresassetsmissing
Downloading.Text =
Downloading.BackgroundColor3 = .(, , )
TweenService:(Downloading, TweenInfo.(), {
Size = .(, , , ),
BackgroundColor3 = .(, , ),
}):()
.()
Downloading:()
Util.GetCDNAsset = (filename)
path = .. filename
s, id = (isfile, path)
s id
s, id = (getcustomasset, path)
s id
Util.MakeTriforce = (tris, color, dur)
dur = dur
(parent, radius, width, rotation, color)
height = (.() / ) * width
pivot = Util.(, parent)
pivot.AnchorPoint = .(, )
pivot.Position = .(, , , )
pivot.Size = .(, , , )
pivot.BackgroundTransparency =
pivot.BorderSizePixel =
pivot.Rotation = rotation
tri = Util.(, pivot)
tri.AnchorPoint = .(, )
tri.Position = .(, , - radius, )
tri.Size = .(width, , height, )
tri.BackgroundTransparency =
tri.BorderSizePixel =
tri.Image = Util.()
grey = .(color.R, color.G, color.B) *
tri.ImageColor3 = .(grey, grey, grey)
TweenService:(tri, TweenInfo.(dur, .EasingStyle.Linear), {
ImageColor3 = color
}):()
radius =
pivot = Util.()
pivot.AnchorPoint = .(, )
pivot.Position = .(, , , )
pivot.BackgroundTransparency =
pivot.BorderSizePixel =
width = * radius * .(.pi / tris) *
i=, tris
(pivot, radius, width, (i / tris) * , color)
pivot
Util.MakeText = (text)
text = text:()
ls =
lt =
lt ..=
lt ..=
lt ..=
lt ..=
pixs = {}
totalsize =
i=,
row = {}
j=, text:()
c = text:(j, j)
w =
c ~=
k = (c - ) * + i
w = lt:(k + , k + )
w ~= w >
w = ls:(w - , w - ) -
w =
k=,
h = (j - ) * + ( - k)
totalsize = .(totalsize, h + )
p = (w // .(, k)) %
p >
row[h] =
pixs[i] = row
pivot = Util.()
pivot.AnchorPoint = .(, )
pivot.Position = .(, , , )
pivot.Size = .(, totalsize, , )
pivot.BackgroundTransparency =
pivot.BorderSizePixel =
i=,
row = pixs[i]
olde =
olds =
j=, totalsize -
pix = row[j]
pix ==
olde ~=
olds +=
olde.Size = .(olds / totalsize, , / , )
olde = Util.(, pivot)
olde.AnchorPoint = .(, )
olde.Position = .(j / totalsize, , i / , )
olde.Size = .( / totalsize, , / , )
olde.BackgroundTransparency =
olde.BorderSizePixel =
olds =
olde =
olds =
pivot
Util.SetTextColor = (text, color, tran)
_,v text:()
v.BackgroundColor3 = color
v.BackgroundTransparency = tran
UISound = {}
UISound.Music = Util.(, UIMainFrame)
UISound.Music.Looped =
UISound.Music.PlaybackRegionsEnabled =
UISound.Music.Volume =
UISound.Music.PlaybackSpeed =
MusicPlayer = {}
MusicPlayer.Database = {
{, },
{, },
{, },
{, },
{, },
{.() < , },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
{, },
}
(()
future = .(MusicPlayer.Database)
()
.(future)
_,file ()
(file) file:(-, -) ==
.(future, {file, file:(, -)})
#future >
MusicPlayer.Database = future
)
MusicPlayer.Switching =
MusicPlayer.Last =
MusicPlayer.PlayMusic = (i)
MusicPlayer.Switching
MusicPlayer.Switching =
last = MusicPlayer.LastMusic
i
i = last
i == last
i = .(, #MusicPlayer.Database)
.()
MusicPlayer.LastMusic = i
hi = MusicPlayer.Database[i]
soundid, soundname = hi[], hi[]
s, id = (isfile, soundid)
s id
s, id = (getcustomasset, soundid)
s
soundid = id
soundid =
soundid =
#soundid ==
MusicPlayer.Switching =
MusicPlayer.()
UISound.Music.SoundId = soundid
UISound.Music.Name = soundname
UISound.Music:()
.()
UISound.Music.TimePosition =
.()
UISound.Music:()
.()
MusicPlayer.Switching =
UISound.Music.Ended:(()
MusicPlayer.()
)
SaveData.SkipIntro = SaveData.SkipIntro
SaveData.SkipIntro
MusicPlayer.()
UISound.Music.Volume =
MusicPlayer.()
RunService.RenderStepped:() UISound.Music.IsLoaded
UISound.Music:()
.()
UISound.Music:()
UISound.Music.Volume =
UISound.Music.TimePosition =
scrolltexts = {
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
}
scrolltexts = scrolltexts[.(, #scrolltexts)]
fade = TweenService:(UIMainFrame, TweenInfo.(), {BackgroundTransparency = })
fade:()
scrolltext = Util.(scrolltexts)
scrolltext.Parent = UIMainFrame
scrolltext.ZIndex =
scrolltext.AnchorPoint = .(, )
scrolltext.Position = .(, , , )
Util.(scrolltext, .(, , ), )
TweenService:(scrolltext, TweenInfo.(, .EasingStyle.Linear), {
Position = .(, , , ),
AnchorPoint = .(, ),
}):()
scrolltextratio = scrolltext.Size.X.Offset / scrolltext.Size.Y.Offset
Triforce1 = Util.(, .(, , ), )
Triforce2 = Util.(, .(, , ), )
Triforce1.ZIndex =
Triforce2.ZIndex =
Triforce1.Parent = UIMainFrame
Triforce2.Parent = UIMainFrame
TRI_offset =
TRI_height =
TRI_rot =
TRI_rotvel =
TRI_scale =
stevetherealone = Util.(, UIMainFrame)
stevetherealone.TextScaled =
stevetherealone.Font = .Font.Arcade
stevetherealone.TextColor3 = .(, , )
stevetherealone.BackgroundColor3 = .(, , )
stevetherealone.BackgroundTransparency =
stevetherealone.BorderColor3 = .(, , )
stevetherealone.BorderSizePixel =
stevetherealone.AnchorPoint = .(, )
stevetherealone.Position = .(, , , )
stevetherealone.Size = .(, , , )
stevetherealone.Visible =
stevetherealone.ZIndex =
stevetherealone_padding = Util.(, stevetherealone)
stevetherealone_padding.PaddingLeft = .(, )
stevetherealone_padding.PaddingRight = .(, )
stevetherealone_padding.PaddingTop = .(, )
stevetherealone_padding.PaddingBottom = .(, )
dt = RunService.Heartbeat:()
t = UISound.Music.TimePosition
t >=
screensize = Util.()
ysize = screensize.Y
height = ysize /
scrolltext.Size = .(height * scrolltextratio * , height)
TRI_rot = (TRI_rot + TRI_rotvel * dt) %
TRI_rotvel *= .(- * dt)
Triforce1.Size = .(TRI_scale * ysize * , TRI_scale * ysize * )
t >=
a = t -
Triforce1.Size = Triforce1.Size:(.(, ), a)
TRI_height = + ( / ysize) * a
Triforce2.Size = Triforce1.Size
Triforce1.Position = .(, ysize * -TRI_offset, TRI_height, ysize * -TRI_offset)
Triforce2.Position = .(, , TRI_height, )
Triforce1.Rotation = TRI_rot
Triforce2.Rotation = TRI_rot
t <
TRI_scale = - (( - .(, t / )) ^ )
a = t -
TRI_scale = + a *
a >
Triforce1.ZIndex =
Triforce2.ZIndex =
Triforce1.ZIndex =
Triforce2.ZIndex =
t <
stevetherealone.Text =
stevetherealone.Visible =
t <
a = (t - ) /
z = * ((a * ) // )
stevetherealone.Text =
stevetherealone.Visible =
stevetherealone.Size = .(z, z)
t <
stevetherealone.Text =
stevetherealone.Visible =
stevetherealone.Size = .(, )
a = (t - ) /
x = * ((a * + ) // )
y = * ((.(, a / ) * + ) // )
stevetherealone.Text =
stevetherealone.Visible =
stevetherealone.Size = .(x, y)
stevetherealone.Position = .(, , , )
stevetherealone:()
Triforce1:()
Triforce2:()
scrolltext:()
fade:()
UIMainFrame.BackgroundTransparency =
flash = Util.(, UIMainFrame)
flash.AnchorPoint = .(, )
flash.Position = .(, , , )
flash.Size = .(, , , )
flash.BackgroundColor3 = .(, , )
flash.BackgroundTransparency =
flash.BorderSizePixel =
flash.Interactable =
flash.ZIndex =
TweenService:(flash, TweenInfo.(), {
BackgroundTransparency =
}):()
Debris:(flash, )
SaveData.MuteUIMusic =
SaveData.MuteReanimMusic =
SaveData.MuteUISound =
SaveData.MuteUIMusic
SaveData.SkipIntro
UISound.Music.Volume =
TweenService:(UISound.Music, TweenInfo.(, .EasingStyle.Linear), {
Volume =
}):()
UISound.Click = Util.(, UIMainFrame)
UISound.Click.SoundId =
UISound.Click.Volume =
UISound.Click.PlaybackSpeed =
SaveData.MuteUISound
UISound.Click.Volume =
StylizedObjs = {}
(obj, options)
options = options {}
Util.(, obj).CornerRadius = .(, )
Out = Util.(, obj)
Out.ApplyStrokeMode = .ApplyStrokeMode.Border
Out.Color = .(, , )
Out.LineJoinMode = .LineJoinMode.Round
Out.Thickness =
Out.Transparency =
Out.Enabled =
obj.BackgroundColor3 = .(, , )
Glos = {}
options.Glow ==
GloF = Util.(, UIMainFrame)
Util.(obj, GloF)
GloF.Interactable =
GloF.BackgroundTransparency =
()
GloF.AnchorPoint = obj.AnchorPoint
GloF.Position = obj.Position - Util.((obj.AnchorPoint * - .one) * )
GloF.Size = obj.Size - .(, )
GloF.Visible = obj.Visible
GloF.ZIndex = obj.ZIndex -
()
obj.Changed:(update)
tex = Util.()
x=,
y=,
Glo = Util.(, GloF)
Glo.AnchorPoint = .( - .(x, ), - .(y, ))
Glo.Position = .(.(x - , ), .(y - , ))
Glo.Size = .( - .(x - ), x == , - .(y - ), y == )
Glo.BackgroundTransparency =
Glo.Image = tex
Glo.ImageRectOffset = .(.(x, ) * , .(y, ) * )
Glo.ImageRectSize = .(x == , y == )
.(Glos, Glo)
.(StylizedObjs, {
obj = obj,
Out = Out,
Glos = Glos,
options = options,
})
ForceUIColor =
ForceUIBGColor =
(t)
ForceUIColor
si = .(.pi * * t / )
h, s, v = ForceUIColor:()
s <
v *= + si *
h += si *
Util.(h, s, v)
Util.(t / , , )
(t)
ForceUIBGColor
si = .(.pi * * t / )
h, s, v = ForceUIBGColor:()
s <
v >
v *= + si *
v *= + si *
h += si *
Util.(h, s, v)
.(, , )
UITextColor = Util.()
UITextColor.Value = .(, , )
(obj)
obj:() obj:()
obj.TextColor3 = UITextColor.Value
Util.(obj, UITextColor.Changed:((val)
obj.TextColor3 = val
))
obj:()
h, s, v = UITextColor.Value:()
obj.TextColor3 = UITextColor.Value
obj.PlaceholderColor3 = .(h, s, + (v - ) * )
Util.(obj, UITextColor.Changed:((val)
h, s, v = val:()
obj.TextColor3 = val
obj.PlaceholderColor3 = .(h, s, + (v - ) * )
))
(t)
c = (t)
bgc = (t)
h, s, v = bgc:()
bgcd = .(h, s, v * )
h2, s2, v2 = c:()
glc = c
v > v2
glc = bgc
_,grad StylizedObjs
obj, Out, Glos, options = grad.obj, grad.Out, grad.Glos, grad.options
Out.Color = c
options.Depthed
obj.BackgroundColor3 = bgcd
obj.BackgroundColor3 = bgc
_,v Glos
v.ImageColor3 = glc
(index)
UIThemes = {
{},
{Fore = .(, , ), SndClick = },
{Fore = .(, , ), Back = .(, , ), Text = .(, , )},
{Fore = .(, , ), Text = .(, , )},
{Fore = .(), Back = .(), SndClick = },
{Fore = .(, , ), Back = .(, , )},
{Fore = .(, , ), Text = .(, , )},
{Fore = .(, , ), Back = .(, , ), Text = .(, , )},
{Fore = .(, , ), Text = .(, , )},
{Back = .(, , ), Text = .(, , )},
{Fore = .(, , ), Back = .(, , ), Text = .(, , ), SndClick = },
{Fore = .(, , ), Back = .(, , )},
{Fore = .(), Back = .(), Text = .(, , )},
{Fore = .(), Back = .(), Text = .()},
{Fore = .(), Back = .(), Text = .(, , )},
{Fore = .(), Back = .(), Text = .(), SndClick = },
}
theme = {, , .(, , ), }
(t)
(t.Fore) ==
theme[] = t.Fore
(t.Back) ==
theme[] = t.Back
(t.Text) ==
theme[] = t.Text
(t.Fore) ==
theme[] = .(t.Fore)
(t.Back) ==
theme[] = .(t.Back)
(t.Text) ==
theme[] = .(t.Text)
(t.Text) ==
theme[] = .(t.Text)
(t.SndClick) ==
theme[] = t.SndClick
index == #UIThemes +
(.UhhhhhhTheme) == (.UhhhhhhTheme) ==
(.UhhhhhhTheme)
SaveData.UIThemeUserDefined = {
Fore = theme[] theme[]:(),
Back = theme[] theme[]:(),
Text = theme[] theme[]:() ,
SndClick = theme[],
}
(SaveData.UIThemeUserDefined) ==
(SaveData.UIThemeUserDefined)
UIThemes[index]
(UIThemes[index])
theme
ForceUIColor = theme[]
ForceUIBGColor = theme[]
UITextColor.Value = theme[]
UISound.Click.SoundId = theme[]
SaveData.UITheme = SaveData.UITheme
(SaveData.UITheme)
CracktroFrameText = .. UhhhhhhVersion
UIMainWindow, WindowContent
UIMainWindow = Util.(, UIMainFrame)
UIMainWindow.Active =
UIMainWindow.AnchorPoint = .(, )
UIMainWindow.Position = .(, , , )
UIMainWindow.Size = .(, , , )
UIMainWindow.BackgroundTransparency =
UIMainWindow.BackgroundColor3 = .(, , )
UIMainWindow.BorderSizePixel =
(UIMainWindow, {
Glow =
})
_clicksndclicked =
UserInputService.InputEnded:((input)
input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
_clicksndclicked =
)
(v)
v:()
v:(, )
v.InputBegan:((input)
_clicksndclicked
input.UserInputState ~= .UserInputState.Begin
input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
UISound.Click:()
_clicksndclicked =
)
(UIMainWindow)
UIMainWindow.DescendantAdded:((v)
v:()
(v)
)
TopBarFrame = Util.(, UIMainWindow)
TopBarFrame.Position = .(, , , )
TopBarFrame.Size = .(, , , )
TopBarFrame.BackgroundTransparency =
TopBarFrame.BackgroundColor3 = .(, , )
TopBarFrame.BorderSizePixel =
TopBarFrame.ClipsDescendants =
TopBarFrame.ZIndex =
(TopBarFrame)
TopBarText = Util.(, TopBarFrame)
TopBarText.AnchorPoint = .(, )
TopBarText.Position = .(, , , )
TopBarText.Size = .(, -, , )
TopBarText.BackgroundTransparency =
TopBarText.ClipsDescendants =
TopBarText.Font = .Font.Code
TopBarText.TextColor3 = .(, , )
TopBarText.TextSize =
TopBarText.TextXAlignment = .TextXAlignment.Left
TopBarText.Text = .. UhhhhhhVersion
TopBarText.RichText =
(TopBarText)
Util.(TopBarText)
(SaveData.SkipIntro .() == ) .() ~=
quotes = {
.. UhhhhhhVersion,
,
,
Player.Name .. ,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
.. UhhhhhhVersion,
}
.() == .() ==
quotes = {
,
,
,
.. Player.Name,
,
,
,
,
,
}
.() == .() ==
quotes = {
,
,
,
.. Player.Name,
,
,
,
}
aprilfools = .() ==
aprilfools
troll = .()
troll ==
CracktroFrameText =
quotes = {}
()
troll ==
CracktroFrameText =
quotes = {}
()
troll ==
CracktroFrameText =
quotes = {}
()
TopBarText.Text = quotes[.(, #quotes)]
aprilfools
.(, ()
TopBarText.Text = .. UhhhhhhVersion
)
TopBarClose = Util.(, TopBarFrame)
TopBarClose.AnchorPoint = .(, )
TopBarClose.Position = .(, , , )
TopBarClose.Size = .(, , , )
TopBarClose.BackgroundTransparency =
TopBarClose.Text =
A = Util.(, TopBarClose)
A.AnchorPoint = .(, )
A.Position = .(, , , )
A.Size = .(, , , )
A.Rotation =
A.BackgroundTransparency =
A.BackgroundColor3 = UITextColor.Value
A.BorderSizePixel =
A.Name =
A = Util.(, A)
A.AnchorPoint = .(, )
A.Position = .(, , , )
A.Size = .(, , , )
A.Rotation =
A.BackgroundTransparency =
A.BackgroundColor3 = UITextColor.Value
A.BorderSizePixel =
A.Name =
UITextColor.Changed:((val)
TopBarClose.A.BackgroundColor3 = val
TopBarClose.A.B.BackgroundColor3 = val
)
WindowContent = Util.(, UIMainWindow)
WindowContent.Position = .(, , , )
WindowContent.Size = .(, , , -)
WindowContent.BackgroundTransparency =
WindowContent.ClipsDescendants =
WindowContent.ZIndex =
MainWindowClosed =
MainWindowTweening =
MainWindowPosOpen =
MainWindowPosClose =
SaveData.WindowClosedPosition
MainWindowPosClose = .((SaveData.WindowClosedPosition))
MainWindowPosClose (MainWindowPosClose.X.Scale < MainWindowPosClose.X.Scale > )
MainWindowPosClose =
MainWindowPosClose (MainWindowPosClose.Y.Scale < MainWindowPosClose.Y.Scale > )
MainWindowPosClose =
TopBarClose.Activated:(()
MainWindowTweening
MainWindowTweening =
MainWindowClosed = MainWindowClosed
MainWindowClosed
MainWindowPosOpen = UIMainWindow.Position
TweenService:(UIMainWindow, TweenInfo.(, .EasingStyle.Cubic, .EasingDirection.Out), {
Position = MainWindowPosClose,
Size = .(, )
}):()
TweenService:(TopBarClose.A, TweenInfo.(, .EasingStyle.Cubic, .EasingDirection.Out), {
Rotation =
}):()
TweenService:(TopBarClose.A.B, TweenInfo.(, .EasingStyle.Cubic, .EasingDirection.Out), {
Size = .(, , , )
}):()
.(, ()
WindowContent.Visible =
MainWindowTweening =
)
WindowContent.Visible =
MainWindowPosClose = UIMainWindow.Position
SaveData.WindowClosedPosition = {MainWindowPosClose.X.Scale, MainWindowPosClose.X.Offset, MainWindowPosClose.Y.Scale, MainWindowPosClose.Y.Offset}
TweenService:(UIMainWindow, TweenInfo.(, .EasingStyle.Cubic, .EasingDirection.Out), {
Position = MainWindowPosOpen,
Size = .(, )
}):()
TweenService:(TopBarClose.A, TweenInfo.(, .EasingStyle.Cubic, .EasingDirection.Out), {
Rotation =
}):()
TweenService:(TopBarClose.A.B, TweenInfo.(, .EasingStyle.Cubic, .EasingDirection.Out), {
Size = .(, , , )
}):()
.(, ()
MainWindowTweening =
)
WindowContent.Active = MainWindowClosed
WindowContent.Interactable = MainWindowClosed
)
dragref =
offset = .(, )
TopBarFrame.InputBegan:((input)
dragref
input.UserInputState ~= .UserInputState.Begin
input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
WindowContent.Interactable =
screen = Util.()
ch = (.(input.Position.X, input.Position.Y) + SCREENGUI.AbsolutePosition) / screen
offset = Util.(UIMainWindow.Position) - ch
dragref = input
)
UserInputService.InputChanged:((input)
dragref
input.UserInputType == .UserInputType.MouseMovement (input.UserInputType == .UserInputType.Touch dragref == input)
screen = Util.()
ch = (.(input.Position.X, input.Position.Y) + SCREENGUI.AbsolutePosition) / screen
pos = ch + offset
dowsize = Util.(UIMainWindow.Size)
imjollx = (dowsize.X * - ) / screen.X
imjolly = dowsize.Y * - / screen.Y
boxy = / screen.Y
pos = .(
.(pos.X, -imjollx, + imjollx),
.(pos.Y, -imjolly, - imjolly - boxy)
)
UIMainWindow.Position = Util.(pos)
)
UserInputService.InputEnded:((input)
dragref dragref == input
input.UserInputType == .UserInputType.MouseButton1 input.UserInputType == .UserInputType.Touch
WindowContent.Interactable =
dragref =
)
_funcrefreshes = {}
(func, linkto)
.(_funcrefreshes, func)
linkto
linkto.Destroying:(()
i = .(_funcrefreshes, func)
i
.(_funcrefreshes, i)
)
func
_totalrendertime =
RunService:( .. Util.(), .RenderPriority.Last.Value - , (dt)
_totalrendertime += dt
(_totalrendertime)
WindowContent.Visible = UIMainWindow.Size.Y.Offset >
_,func _funcrefreshes
s, e = (func, _totalrendertime, dt)
)
uinotif = {
Text = ,
Progress = -,
LastNotif = -,
Animation = ,
ProgressSm = ,
}
Util.UINotify = (text, prog)
uinotif.Text, uinotif.Progress = text, prog
uinotif.LastNotif = _totalrendertime
UINotifyFrame = .(, UIMainFrame)
UINotifyFrame.AnchorPoint = .(, )
UINotifyFrame.Position = .(, , , )
UINotifyFrame.Size = .(, , , )
UINotifyFrame.BackgroundTransparency =
UINotifyFrame.BackgroundColor3 = .(, , )
UINotifyFrame.BorderSizePixel =
UINotifyFrame.Visible =
UINotifyFrame.ZIndex = -
(UINotifyFrame, {
Glow = ,
})
Progress = .(, UINotifyFrame)
Progress.AnchorPoint = .(, )
Progress.Position = .(, , , )
Progress.Size = .(, -, , )
Progress.BackgroundTransparency =
Progress.BackgroundColor3 = .(, , )
Progress.BorderSizePixel =
ProgressTop = .(, Progress)
ProgressTop.AnchorPoint = .(, )
ProgressTop.Position = .(, , , )
ProgressTop.Size = .(, , , )
ProgressTop.BackgroundTransparency =
ProgressTop.BackgroundColor3 = .(, , )
ProgressTop.BorderSizePixel =
ProgressBot = .(, Progress)
ProgressBot.AnchorPoint = .(, )
ProgressBot.Position = .(, , , )
ProgressBot.Size = .(, , , )
ProgressBot.BackgroundTransparency =
ProgressBot.BackgroundColor3 = .(, , )
ProgressBot.BorderSizePixel =
NotifyText = Util.(, UINotifyFrame)
NotifyText.AnchorPoint = .(, )
NotifyText.Position = .(, , , )
NotifyText.Size = .(, , , )
NotifyText.BackgroundTransparency =
NotifyText.ClipsDescendants =
NotifyText.Font = .Font.Code
NotifyText.TextColor3 = .(, , )
NotifyText.TextSize =
NotifyText.TextXAlignment = .TextXAlignment.Center
NotifyText.Text =
(NotifyText)
((t, dt)
t - uinotif.LastNotif < uinotif.Progress <
uinotif.Animation = .(, uinotif.Animation - dt * )
uinotif.Animation = .(, uinotif.Animation + dt * )
uinotif.Animation <
UINotifyFrame.Visible =
UINotifyFrame.Position = UIMainWindow.Position + .(, , , UIMainWindow.Size.Y.Offset / + + .(uinotif.Animation, ) * -)
uinotif.Progress >=
Progress.BackgroundTransparency = .(t - uinotif.LastNotif, ) * * +
Progress.BackgroundTransparency =
c = (t)
s = .(t * ) * +
uinotif.Progress >
uinotif.ProgressSm = uinotif.Progress + (uinotif.ProgressSm - uinotif.Progress) * .(- * dt)
ProgressTop.BackgroundTransparency =
ProgressBot.BackgroundTransparency =
ProgressTop.Size = .(uinotif.ProgressSm, , , )
ProgressBot.Size = .(uinotif.ProgressSm, , , )
uinotif.ProgressSm =
ProgressTop.BackgroundTransparency = s
ProgressBot.BackgroundTransparency = s
ProgressTop.Size = .(, , , )
ProgressBot.Size = .(, , , )
ProgressTop.BackgroundColor3 = c
ProgressBot.BackgroundColor3 = c
NotifyText.Text = uinotif.Text
UINotifyFrame.Visible =
, UINotifyFrame)
CracktroFrame = Util.(, WindowContent)
CracktroFrame.Active =
CracktroFrame.AnchorPoint = .(, )
CracktroFrame.Position = .(, , , )
CracktroFrame.Size = .(, , , )
CracktroFrame.BackgroundTransparency =
CracktroFrame.BackgroundColor3 = .(, , )
CracktroFrame.BorderSizePixel =
CracktroFrame.BorderColor3 = .(, , )
CracktroFrame.ZIndex =
CracktroFrame.ClipsDescendants =
((t)
CracktroFrame.BorderColor3 = (t)
CracktroFrame.BackgroundColor3 = (t)
, CracktroFrame)
TriforceClip = Util.(, CracktroFrame)
TriforceClip.Position = .(, , , )
TriforceClip.Size = .(, , , )
TriforceClip.BackgroundTransparency =
TriforceClip.ZIndex =
Glowy = Util.(, CracktroFrame)
Glowy.AnchorPoint = .(, )
Glowy.Position = .(, , , )
Glowy.Size = .(, , , )
Glowy.BackgroundTransparency =
Glowy.Image = Util.()
Glowy.ImageColor3 = UITextColor.Value
Glowy.ImageTransparency =
Glowy.ZIndex = -
Triforce = Util.(, .(, , ), )
Triforce.AnchorPoint = .(, )
Triforce.Position = .(, , , )
Triforce.Size = .(, , , )
Triforce.Parent = TriforceClip
particles = {}
ps =
psc = .(, , )
i=, ps
r = (i / ps) * * .pi
p = Util.(, CracktroFrame)
p.AnchorPoint = .(, )
p.Size = .(, )
p.BackgroundColor3 = psc
p.BackgroundTransparency =
p.BorderSizePixel =
p.ZIndex = -
p.Visible =
.(particles, {
p, .(.(r), .(r)) * ,
.(.(-, ), .(-, )),
.() * - , , -
})
trivel =
oldpbl =
text = Util.(CracktroFrameText)
text.AnchorPoint = .(, )
text.Position = .(, , , -)
text.ZIndex =
text.Parent = CracktroFrame
text0 = Util.()
text0.AnchorPoint = .(, )
text0.Position = .(, , , -)
text0.ZIndex =
text0.Parent = CracktroFrame
text1 = Util.( .. (.() < (.() < )))
text1.AnchorPoint = .(, )
text1.Position = .(, , , -)
text1.ZIndex =
text1.Parent = CracktroFrame
text2 = Util.()
text2.AnchorPoint = .(, )
text2.Position = .(, , , -)
text2.ZIndex =
text2.Parent = CracktroFrame
Util.(text, UITextColor.Value, )
Util.(text0, UITextColor.Value, )
Util.(text1, UITextColor.Value, )
Util.(text2, UITextColor.Value, )
quotes = {
,
Player.Name .. .. .() .. ,
.. .() .. ,
.. Player.Name .. ,
.. .() .. ,
,
,
,
,
,
,
,
,
,
,
,
,
}
text3 =
text3mustchange =
()
text3 text3:()
text3 = Util.(quotes[.(, #quotes)])
text3.AnchorPoint = .(, )
text3.Position = .(, , , -)
text3.ZIndex =
text3.Parent = CracktroFrame
Util.(text3, UITextColor.Value, )
()
UITextColor.Changed:((val)
Util.(text, val, )
Util.(text0, val, )
Util.(text1, val, )
Util.(text2, val, )
Util.(text3, val, )
)
PositionProcessor = {
(i, v, dt, pbl, spike)
inst, pos, vel, zind, lvis, lzind = (v)
d = pos.Magnitude
d >
r = .(pos.X / d, pos.Y / d)
a = .pi *
out = .(.(r + a), .(r + a))
tp = out * ( + pbl / )
tv = (tp - pos) *
vel = tv:(vel, .(- * dt))
.() <
vel += .(.(-, ), .(-, ))
spike >
vel += out * * .()
pos += vel * dt
pos += .(, )
v[], v[] = pos, vel
.(zind * pos.Magnitude / , pos.Y, pos.X)
,
(i, v, dt, pbl, spike)
inst, pos, vel, zind, lvis, lzind = (v)
a = i / ps
s = (a * ) %
r = (a + s / ) * * .pi + .() * + zind * .pi * * (pbl / ) * ( - s)
pos = .(.(r), .(r)) * s * ( + pbl / )
v[], v[] = pos, .zero
.(, pos.Y, pos.X)
,
(i, v, dt, pbl, spike)
inst, pos, vel, zind, lvis, lzind = (v)
a = i / ps
b = /
c = .() /
d = {
{.(, b + c), .(-, b)},
{.(-, b), .(-, b - c)},
{.(-, b - c), .(, b - c)},
{.(, b - c), .(, b - c)},
{.(, b - c), .(, b)},
{.(, b), .(, b - c)},
{.(, b - c), .(-, b)},
{.(-, b), .(, b)},
{.(, b), .(, b + c)},
}
t = a * #d
i = .(t) +
u = t %
i > #d
i = #d
u =
pos = d[i][]:(d[i][], u) *
r = .() *
pos = .(
pos.X * .(r) - pos.Y * .(r),
pos.X * .(r) + pos.Y * .(r)
)
v[], v[] = pos, .zero
.(, pos.Y, pos.X)
,
}
currentprocessor =
((t, dt)
Util.(CracktroFrame)
pp = PositionProcessor[currentprocessor]
CracktroFrameAbsoluteSize = CracktroFrame.AbsoluteSize
Glowy.ImageColor3 = UITextColor.Value
Glowy.ImageTransparency = + .(((.() / ) % ) * .pi) *
pbl = UISound.Music.PlaybackLoudness
spike = .(, (pbl - oldpbl) - )
oldpbl = pbl
trivelt = pbl * * dt
trivel = trivelt + (trivel - trivelt) * .(- * dt)
Triforce.Rotation = (Triforce.Rotation + trivel) %
ring = .(
,
.(((t / ) % ) * .pi) * .pi * ,
( - .(((t / ) % ) * .pi)) * .pi *
)
fov =
i,v particles
inst, pos, vel, zind, lvis, lzind = (v)
sp = ring:((i, v, dt, pbl, spike))
z = sp.Z
sc = fov / (z + fov)
sp = .(sp.X, sp.Y) * sc
nvis, nzind = lvis, lzind
z > - fov
inst.Position = Util.(sp + CracktroFrameAbsoluteSize / )
inst.Size = .(sc * , sc * )
nvis =
z >
nzind = -
nzind =
nvis =
lvis ~= nvis
inst.Visible = nvis
v[] = nvis
lzind ~= nzind
inst.ZIndex = nzind
v[] = nzind
textsel = t %
IsUhhhhhhFullyLoaded
textsel = t %
textsel //=
text3mustchange ~= (textsel == )
text3mustchange = (textsel == )
text3mustchange ()
textsel ==
text0.Visible =
text1.Visible =
text2.Visible =
text3.Visible =
textsel ==
text0.Visible =
text1.Visible =
text2.Visible =
text3.Visible =
textsel ==
text0.Visible =
text1.Visible =
text2.Visible =
text3.Visible =
text0.Visible =
text1.Visible =
text2.Visible =
text3.Visible =
currentprocessor = .(, #PositionProcessor)
, CracktroFrame)
.()
UI = {}
UI.()
Frame = Util.(, WindowContent)
Frame.AnchorPoint = .(, )
Frame.Position = .(, , , )
Frame.Size = .(, , , )
Frame.BackgroundTransparency =
Frame.BackgroundColor3 = .(, , )
Frame.BorderSizePixel =
Frame.BorderColor3 = .(, , )
Frame.Visible =
Frame.ZIndex =
Frame.AutomaticCanvasSize = .AutomaticSize.Y
Frame.CanvasSize = .(, , , )
Frame.ClipsDescendants =
((t)
Frame.BorderColor3 = (t)
Frame.BackgroundColor3 = (t)
, Frame)
Frame.ScrollingDirection = .ScrollingDirection.Y
Frame.ScrollBarThickness =
Frame.ElasticBehavior = .ElasticBehavior.Always
Frame.TopImage =
Frame.MidImage =
Frame.BottomImage =
Frame.ScrollBarImageTransparency =
Frame.ScrollBarImageColor3 = UITextColor.Value
Util.(Frame, UITextColor.Changed:((val)
Frame.ScrollBarImageColor3 = val
))
Padding = Util.(, Frame)
Padding.PaddingTop = .(, )
Padding.PaddingBottom = .(, )
Padding.PaddingLeft = .(, )
Padding.PaddingRight = UDim.new(0, 0)
local UIList = Util.Instance("UIListLayout", Frame)
UIList.FillDirection = Enum.FillDirection.Vertical
UIList.HorizontalAlignment = Enum.HorizontalAlignment.Center
UIList.VerticalAlignment = Enum.VerticalAlignment.Top
UIList.Padding = UDim.new(0, 0)
UIList.SortOrder = Enum.SortOrder.LayoutOrder
return Frame
end
function UI.CreateText(parent, text, size, alignment)
local margin = 5
local Container = Util.Instance("Frame", parent)
Container.AnchorPoint = Vector2.new(0.5, 0)
Container.Size = UDim2.new(1, 0, 0, 65536)
Container.BackgroundTransparency = 1
Container.LayoutOrder = #parent:GetChildren()
local Text = Util.Instance("TextLabel", Container)
Text.Position = UDim2.new(0, margin, 0, 0)
Text.Size = UDim2.new(1, margin * -2, 1, -margin + 1)
Text.BackgroundTransparency = 1
Text.RichText = true
Text.Font = Enum.Font.Code
Text.TextColor3 = Color3.new(1, 1, 1)
Text.TextTransparency = 0
Text.TextXAlignment = alignment
Text.TextYAlignment = Enum.TextYAlignment.Top
Text.TextWrapped = true
Text.TextSize = size
RegisterTextLabel(Text)
local function update()
local x = parent.AbsoluteSize.X
local size = TextService:GetTextSize(Text.ContentText, Text.TextSize, Text.Font, Vector2.new(x - margin * 2, math.huge))
Container.Size = UDim2.new(1, 0, 0, size.Y + margin)
end
Text.Text = text
update()
Text.Changed:Connect(update)
return Text
end
function UI.CreateSeparator(parent)
local Container = Util.Instance("Frame", parent)
Container.AnchorPoint = Vector2.new(0.5, 0)
Container.Size = UDim2.new(1, 0, 0, 7)
Container.BackgroundTransparency = 1
Container.LayoutOrder = #parent:GetChildren()
local Sep = Util.Instance("Frame", Container)
Sep.AnchorPoint = Vector2.new(0.5, 0.5)
Sep.Position = UDim2.new(0.5, 0, 0.5, 0)
Sep.Size = UDim2.new(1, -8, 0, 1)
Sep.BackgroundColor3 = UITextColor.Value
Sep.BackgroundTransparency = 0.8
Sep.BorderSizePixel = 0
Util.LinkDestroyI2C(Sep, UITextColor.Changed:Connect(function(val)
Sep.BackgroundColor3 = val
end))
end
function UI.CreateButton(parent, text, size)
local margin = 5
local Container = Util.Instance("Frame", parent)
Container.AnchorPoint = Vector2.new(0.5, 0)
Container.Size = UDim2.new(1, 0, 0, 65536)
Container.BackgroundTransparency = 1
Container.LayoutOrder = #parent:GetChildren()
local Button = Util.Instance("TextButton", Container)
Button.AnchorPoint = Vector2.new(0, 0)
Button.Position = UDim2.new(0, margin, 0, margin // 2)
Button.Size = UDim2.new(1, margin * -2, 1, -margin)
Button.BackgroundTransparency = 0
Button.BackgroundColor3 = Color3.new(1, 1, 1)
Button.BorderSizePixel = 0
Button.Text = ""
Button.AutoButtonColor = true
local ButtonText = Util.Instance("TextLabel", Button)
ButtonText.AnchorPoint = Vector2.new(0, 0.5)
ButtonText.Position = UDim2.new(0, 0, 0.5, 0)
ButtonText.Size = UDim2.new(1, 0, 1, -margin)
ButtonText.BackgroundTransparency = 1
ButtonText.RichText = true
ButtonText.Font = Enum.Font.Code
ButtonText.TextColor3 = Color3.new(1, 1, 1)
ButtonText.TextTransparency = 0
ButtonText.TextXAlignment = Enum.TextXAlignment.Center
ButtonText.TextYAlignment = Enum.TextYAlignment.Center
ButtonText.TextWrapped = true
ButtonText.TextSize = size
RegisterTextLabel(ButtonText)
Stylize(Button)
local function update()
local x = parent.AbsoluteSize.X
local size = TextService:GetTextSize(ButtonText.ContentText, ButtonText.TextSize, ButtonText.Font, Vector2.new(x - margin * 2, math.huge))
Container.Size = UDim2.new(1, 0, 0, size.Y + margin * 2)
end
ButtonText.Text = text
update()
ButtonText.Changed:Connect(update)
return Button, ButtonText
end
function UI.CreateSwitch(parent, text, value)
local margin = 5
local switchsize = 50
local Container = Util.Instance("Frame", parent)
Container.AnchorPoint = Vector2.new(0.5, 0)
Container.Size = UDim2.new(1, 0, 0, 10)
Container.BackgroundTransparency = 1
Container.LayoutOrder = #parent:GetChildren()
local Button = Util.Instance("TextButton", Container)
Button.AnchorPoint = Vector2.new(0, 0)
Button.Position = UDim2.new(0, 0, 0, 0)
Button.Size = UDim2.new(1, 0, 1, 0)
Button.BackgroundTransparency = 1
Button.Text = ""
local ButtonText = Util.Instance("TextLabel", Button)
ButtonText.AnchorPoint = Vector2.new(0, 0)
ButtonText.Position = UDim2.new(0, margin, 0, 0)
ButtonText.Size = UDim2.new(1, margin * -3 - switchsize, 1, 0)
ButtonText.BackgroundTransparency = 1
ButtonText.RichText = true
ButtonText.Font = Enum.Font.Code
ButtonText.TextColor3 = Color3.new(1, 1, 1)
ButtonText.TextTransparency = 0
ButtonText.TextXAlignment = Enum.TextXAlignment.Left
ButtonText.TextYAlignment = Enum.TextYAlignment.Center
ButtonText.TextWrapped = true
ButtonText.TextSize = 20
RegisterTextLabel(ButtonText)
local function update()
local x = parent.AbsoluteSize.X
local size = TextService:GetTextSize(ButtonText.ContentText, ButtonText.TextSize, ButtonText.Font, Vector2.new(x - margin * 3 - switchsize, math.huge))
Container.Size = UDim2.new(1, 0, 0, math.max(35, size.Y))
end
ButtonText.Text = text
update()
ButtonText.Changed:Connect(update)
local Switch = Util.Instance("Frame", Container)
Switch.AnchorPoint = Vector2.new(1, 0.5)
Switch.Position = UDim2.new(1, -margin, 0.5, 0)
Switch.Size = UDim2.new(0, 25, 0, 25)
Switch.BackgroundTransparency = 0
Switch.BackgroundColor3 = Color3.new(0, 0, 0)
Switch.BorderSizePixel = 0
Util.Instance("UICorner", Switch).CornerRadius = UDim.new(0, 5)
Stylize(Switch)
local SwitchDot = Util.Instance("Frame", Switch)
SwitchDot.AnchorPoint = Vector2.new(0.5, 0.5)
SwitchDot.Position = UDim2.new(0.5, 0, 0.5, 0)
SwitchDot.Size = UDim2.new(0, 19, 0, 19)
SwitchDot.BackgroundTransparency = 0.2
SwitchDot.BackgroundColor3 = UITextColor.Value
SwitchDot.BorderSizePixel = 0
Util.LinkDestroyI2C(SwitchDot, UITextColor.Changed:Connect(function(val)
SwitchDot.BackgroundColor3 = val
end))
Util.Instance("UICorner", SwitchDot).CornerRadius = UDim.new(0, 2)
local Lever = Util.Instance("BoolValue")
Lever.Value = value
local function updatesw()
SwitchDot.Visible = Lever.Value
end
Lever.Changed:Connect(updatesw)
updatesw()
Button.Activated:Connect(function()
Lever.Value = not Lever.Value
end)
return Lever, ButtonText
end
function UI.CreateTextbox(parent, text, placeholder, size)
local margin = 5
local Container = Util.Instance("Frame", parent)
Container.AnchorPoint = Vector2.new(0.5, 0)
Container.Size = UDim2.new(1, 0, 0, 65536)
Container.BackgroundTransparency = 1
Container.LayoutOrder = #parent:GetChildren()
local Box = Util.Instance("Frame", Container)
Box.AnchorPoint = Vector2.new(0, 0)
Box.Position = UDim2.new(0, margin, 0, margin // 2)
Box.Size = UDim2.new(1, margin * -2, 1, -margin)
Box.BackgroundTransparency = 0
Box.BackgroundColor3 = Color3.new(0.9, 0.9, 0.9)
Box.BorderSizePixel = 0
local BoxText = Util.Instance("TextBox", Box)
BoxText.AnchorPoint = Vector2.new(0, 0.5)
BoxText.Position = UDim2.new(0, 0, 0.5, 0)
BoxText.Size = UDim2.new(1, 0, 1, -margin)
BoxText.BackgroundTransparency = 1
BoxText.Font = Enum.Font.Code
BoxText.TextColor3 = Color3.new(1, 1, 1)
BoxText.PlaceholderColor3 = Color3.new(0.7, 0.7, 0.7)
BoxText.TextTransparency = 0
BoxText.TextXAlignment = Enum.TextXAlignment.Center
BoxText.TextYAlignment = Enum.TextYAlignment.Center
BoxText.TextWrapped = true
BoxText.TextSize = size
BoxText.ClearTextOnFocus = false
RegisterTextLabel(BoxText)
BoxText.Focused:Connect(function()
UISound.Click:Play()
end)
Stylize(Box, {
Depthed = true,
})
local function update()
local x = parent.AbsoluteSize.X
if not BoxText.TextWrapped then
x = math.huge
end
local t = BoxText.Text
if t:len() == 0 then
t = BoxText.PlaceholderText
end
local size = TextService:GetTextSize(t, BoxText.TextSize, BoxText.Font, Vector2.new(x - margin * 2, math.huge))
Container.Size = UDim2.new(1, 0, 0, size.Y + margin * 2 + 2)
end
BoxText.Text = text
BoxText.PlaceholderText = placeholder
update()
BoxText.Changed:Connect(update)
return BoxText
end
function UI.CreateSlider(parent, text, value, min, max, step)
min = min or 1
max = max or 10
step = math.abs(step or 0)
assert(max > min)
local margin = 5
local Container = Util.Instance("Frame", parent)
Container.AnchorPoint = Vector2.new(0.5, 0)
Container.Size = UDim2.new(1, 0, 0, 65)
Container.BackgroundTransparency = 1
Container.LayoutOrder = #parent:GetChildren()
local Text = Util.Instance("TextLabel", Container)
Text.AnchorPoint = Vector2.new(0, 0)
Text.Position = UDim2.new(0, margin, 0, 0)
Text.Size = UDim2.new(1, margin * -2, 0, 35)
Text.BackgroundTransparency = 1
Text.RichText = true
Text.Font = Enum.Font.Code
Text.TextColor3 = Color3.new(1, 1, 1)
Text.TextTransparency = 0
Text.TextXAlignment = Enum.TextXAlignment.Left
Text.TextYAlignment = Enum.TextYAlignment.Center
Text.TextWrapped = true
Text.TextSize = 20
Text.Text = text
RegisterTextLabel(Text)
local Box = Util.Instance("Frame", Container)
Box.AnchorPoint = Vector2.new(1, 0)
Box.Position = UDim2.new(1, -margin, 0, margin)
Box.Size = UDim2.new(0, 80, 0, 35 - margin * 2)
Box.BackgroundTransparency = 0
Box.BackgroundColor3 = Color3.new(1, 1, 1)
Box.BorderSizePixel = 0
local BoxText = Util.Instance("TextBox", Box)
BoxText.AnchorPoint = Vector2.new(0, 0.5)
BoxText.Position = UDim2.new(0, 0, 0.5, 0)
BoxText.Size = UDim2.new(1, 0, 1, -margin)
BoxText.BackgroundTransparency = 1
BoxText.Font = Enum.Font.Code
BoxText.TextColor3 = Color3.new(1, 1, 1)
BoxText.PlaceholderColor3 = Color3.new(0.7, 0.7, 0.7)
BoxText.TextTransparency = 0
BoxText.TextXAlignment = Enum.TextXAlignment.Center
BoxText.TextYAlignment = Enum.TextYAlignment.Center
BoxText.TextWrapped = true
BoxText.TextSize = 15
BoxText.ClearTextOnFocus = false
RegisterTextLabel(BoxText)
BoxText.Focused:Connect(function()
UISound.Click:Play()
end)
Stylize(Box, {
Depthed = true,
})
local SliderC = Util.Instance("TextButton", Container)
SliderC.AnchorPoint = Vector2.new(0, 0)
SliderC.Position = UDim2.new(0, 0, 0, 40)
SliderC.Size = UDim2.new(1, 0, 0, 20)
SliderC.BackgroundTransparency = 1
SliderC.Text = ""
SliderC.AutoButtonColor = true
local SliderR = Util.Instance("Frame", SliderC)
SliderR.AnchorPoint = Vector2.new(0.5, 0.5)
SliderR.Position = UDim2.new(0.5, 0, 0.5, 0)
SliderR.Size = UDim2.new(1, margin * -2 - 18, 0, 5)
SliderR.BackgroundTransparency = 0
SliderR.BackgroundColor3 = Color3.new(1, 1, 1)
SliderR.BorderSizePixel = 0
local SliderB = Util.Instance("Frame", SliderR)
SliderB.AnchorPoint = Vector2.new(0.5, 0.5)
SliderB.Position = UDim2.new(0, 0, 0.5, 0)
SliderB.Size = UDim2.new(0, 18, 0, 18)
SliderB.BackgroundTransparency = 0
SliderB.BackgroundColor3 = Color3.new(1, 1, 1)
SliderB.BorderSizePixel = 0
SliderB.ZIndex = 2
Stylize(SliderR, {
Depthed = true,
})
Stylize(SliderB)
local range = max - min
if step > 0 then
if range / step < 20 then
local i = min + step
while i < max do
local snaps = Util.Instance("Frame", SliderR)
snaps.AnchorPoint = Vector2.new(0.5, 0)
snaps.Position = UDim2.new((i - min) / range, 0, 0, 1)
snaps.Size = UDim2.new(0, 1, 0, 3)
snaps.BackgroundTransparency = 0.5
snaps.BackgroundColor3 = Color3.new(1, 1, 1)
snaps.BorderSizePixel = 0
i += step
end
end
end
local Select = Util.Instance("NumberValue")
local function update()
local str = string.format("%.3f", Select.Value)
if str:find("%.") then
while str:sub(-1) == "0" do
str = str:sub(1, -2)
if str:sub(-1) == "." then
str = str:sub(1, -2)
break
end
end
end
BoxText.Text = str
SliderB.Position = UDim2.new(math.clamp((Select.Value - min) / (max - min), 0, 1), 0, 0.5, 0)
if math.random(4) == 1 then
if str:find("67") or str:find("6.7") then
Util.UINotify("SIX SEVENNNN 67 67 67 67 OMG")
end
end
end
Select.Value = value
Select.Changed:Connect(update)
update()
BoxText.FocusLost:Connect(function()
Select.Value = tonumber(BoxText.Text) or Select.Value
update()
end)
local function ondrag(x)
local val = range * math.clamp((x - SliderR.AbsolutePosition.X) / SliderR.AbsoluteSize.X, 0, 1)
if step > 0 then
val = math.round(val / step) * step
end
val += min
Select.Value = val
end
local dragref = nil
local start = nil
SliderC.InputBegan:Connect(function(input)
if input.UserInputState ~= Enum.UserInputState.Begin then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragref = input
start = input.Position
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragref then
if input.UserInputType == Enum.UserInputType.MouseMovement or (input.UserInputType == Enum.UserInputType.Touch and dragref == input) then
if start then
local delta = input.Position - start
if delta.Magnitude > 10 then
start = nil
if math.abs(delta.X) < math.abs(delta.Y) then
dragref = nil
end
end
else
ondrag(input.Position.X)
end
end
end
end)
UserInputService.InputEnded:Connect(function(input)
if dragref and dragref == input then
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
ondrag(input.Position.X)
dragref = nil
end
end
end)
return Select
end
function UI.CreateDropdown(parent, text, array, value)
value = value and math.clamp(value, 1, #array) or 1
local margin = 5
local Container = Util.Instance("Frame", parent)
Container.AnchorPoint = Vector2.new(0.5, 0)
Container.Size = UDim2.new(1, 0, 0, 10)
Container.BackgroundTransparency = 1
Container.LayoutOrder = #parent:GetChildren()
local Text = Util.Instance("TextLabel", Container)
Text.AnchorPoint = Vector2.new(0, 0)
Text.Position = UDim2.new(0, margin, 0, 0)
Text.Size = UDim2.new(1, margin * -2, 1, 0)
Text.BackgroundTransparency = 1
Text.RichText = true
Text.Font = Enum.Font.Code
Text.TextColor3 = Color3.new(1, 1, 1)
Text.TextTransparency = 0
Text.TextXAlignment = Enum.TextXAlignment.Left
Text.TextYAlignment = Enum.TextYAlignment.Center
Text.TextWrapped = true
Text.TextSize = 20
RegisterTextLabel(Text)
local Dropdown = Util.Instance("TextButton", Container)
Dropdown.AnchorPoint = Vector2.new(1, 0.5)
Dropdown.Position = UDim2.new(1, -margin, 0.5, 0)
Dropdown.Size = UDim2.new(0.5, 0, 1, -margin)
Dropdown.BackgroundTransparency = 0
Dropdown.BackgroundColor3 = Color3.new(1, 1, 1)
Dropdown.BorderSizePixel = 0
Dropdown.Text = ""
Dropdown.AutoButtonColor = true
local DropdownText = Util.Instance("TextLabel", Dropdown)
DropdownText.AnchorPoint = Vector2.new(0.5, 0.5)
DropdownText.Position = UDim2.new(0.5, 0, 0.5, 0)
DropdownText.Size = UDim2.new(1, -margin * 2, 1, -margin)
DropdownText.BackgroundTransparency = 1
DropdownText.RichText = true
DropdownText.Font = Enum.Font.Code
DropdownText.TextColor3 = Color3.new(1, 1, 1)
DropdownText.TextTransparency = 0
DropdownText.TextXAlignment = Enum.TextXAlignment.Center
DropdownText.TextYAlignment = Enum.TextYAlignment.Center
DropdownText.TextWrapped = true
DropdownText.TextSize = 15
RegisterTextLabel(DropdownText)
Stylize(Dropdown)
local function update()
local x = parent.AbsoluteSize.X
local size1 = TextService:GetTextSize(Text.ContentText, Text.TextSize, Text.Font, Vector2.new(x - margin * 2, math.huge))
local size2 = TextService:GetTextSize(DropdownText.ContentText, DropdownText.TextSize, DropdownText.Font, Vector2.new(x * 0.8 - margin * 2, math.huge))
Container.Size = UDim2.new(1, 0, 0, math.max(35, size1.Y, size2.Y + margin * 2))
Dropdown.Size = UDim2.new(0, math.max(60, size2.X + margin * 2 + 2), 0, math.max(25, size2.Y + margin * 2))
end
Text.Text = text
DropdownText.Text = array[value]
update()
Text.Changed:Connect(update)
DropdownText.Changed:Connect(update)
local Select = Util.Instance("IntValue")
Select.Value = value
Select.Changed:Connect(function()
DropdownText.Text = array[Select.Value]
end)
local Droplist = Util.Instance("ScrollingFrame", UIMainFrame)
Droplist.AnchorPoint = Vector2.new(0, 0)
Droplist.Position = UDim2.new(0, 0, 0, 0)
Droplist.Size = UDim2.new(0, 0, 0, 0)
Droplist.BackgroundTransparency = 0
Droplist.BackgroundColor3 = Color3.new(1, 1, 1)
Droplist.BorderSizePixel = 0
Droplist.Visible = false
Droplist.CanvasSize = UDim2.new(0, 0, 0, 0)
Droplist.AutomaticCanvasSize = Enum.AutomaticSize.Y
Droplist.ScrollBarThickness = 0
Droplist.ScrollingDirection = Enum.ScrollingDirection.Y
local Padding = Util.Instance("UIPadding", Droplist)
Padding.PaddingLeft = UDim.new(0, 5)
Padding.PaddingRight = UDim.new(0, 5)
Padding.PaddingTop = UDim.new(0, 0)
Padding.PaddingBottom = UDim.new(0, 0)
local UIList = Util.Instance("UIListLayout", Droplist)
UIList.FillDirection = Enum.FillDirection.Vertical
UIList.HorizontalAlignment = Enum.HorizontalAlignment.Center
UIList.VerticalAlignment = Enum.VerticalAlignment.Top
UIList.Padding = UDim.new(0, 0)
UIList.SortOrder = Enum.SortOrder.LayoutOrder
Stylize(Droplist, {
Glow = true
})
local items = {}
local sizex = 60
local interact = false
local opened = false
Util.LinkDestroyI2I(Dropdown, Droplist)
for i,itemname in array do
local Item = Util.Instance("TextButton", Droplist)
Item.Size = UDim2.new(1, 0, 0, 20)
Item.BackgroundTransparency = 0
Item.BackgroundColor3 = Color3.new(0, 0, 0)
Item.BorderSizePixel = 0
Item.AutoButtonColor = true
Item.LayoutOrder = i
Item.Text = itemname
Item.TextSize = 15
Item.Font = Enum.Font.Code
Item.TextColor3 = Color3.new(1, 1, 1)
Item.TextXAlignment = Enum.TextXAlignment.Left
Item.TextYAlignment = Enum.TextYAlignment.Center
Item.TextWrapped = false
RegisterTextLabel(Item)
table.insert(items, Item)
local size = TextService:GetTextSize(itemname, Item.TextSize, Item.Font, Vector2.new(math.huge, math.huge))
sizex = math.max(sizex, size.X + 12)
Item.Activated:Connect(function()
Select.Value = i
opened = false
interact = true
end)
Item.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
interact = true
UISound.Click:Play()
end
end)
end
Dropdown.Activated:Connect(function()
opened = not opened
interact = true
end)
local conn = UserInputService.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
task.wait()
if not interact then
opened = false
end
interact = false
end
end)
Util.LinkDestroyI2C(Dropdown, conn)
local scrollframe = Container:FindFirstAncestorWhichIsA("ScrollingFrame")
if scrollframe then
local conn = scrollframe:GetPropertyChangedSignal("CanvasPosition"):Connect(function()
opened = false
end)
end
local opentween = 0
AddToRenderStep(function(t, dt)
if opened then
opentween = 1 + (opentween - 1) * math.exp(-32 * dt)
Droplist.ZIndex = 4
Droplist.Interactable = true
else
opentween *= math.exp(-32 * dt)
Droplist.ZIndex = 3
Droplist.Interactable = false
end
local ysize = math.round(math.min(90, #items * 20) * opentween)
if ysize >= 1 then
Droplist.Position = Util.Vector2ToUDim2Offset((Dropdown.AbsolutePosition + Vector2.new(0, Dropdown.AbsoluteSize.Y)) - UIMainFrame.AbsolutePosition)
Droplist.Size = UDim2.new(0, math.max(Dropdown.Size.X.Offset, sizex), 0, ysize)
Droplist.Visible = true
else
Droplist.Visible = false
end
local i1 = GetUIBGColor(t)
local i2 = i1:Lerp(Color3.new(1, 1, 1), 0.1)
for i,v in items do
if i == Select.Value then
v.BackgroundColor3 = i2
else
v.BackgroundColor3 = i1
end
end
end, Droplist)
Util.LinkDestroyI2I(Dropdown, Select)
return Select, Text
end
function UI.CreateCanvas(parent)
local margin = 5
local Container = Util.Instance("Frame", parent)
Container.AnchorPoint = Vector2.new(0.5, 0)
Container.Size = UDim2.new(1, 0, 0, 30)
Container.BackgroundTransparency = 1
Container.LayoutOrder = #parent:GetChildren()
Container.AutomaticSize = Enum.AutomaticSize.Y
local Padding = Util.Instance("UIPadding", Container)
Padding.PaddingTop = UDim.new(0, 2)
Padding.PaddingBottom = UDim.new(0, 2)
Padding.PaddingLeft = UDim.new(0, 5)
Padding.PaddingRight = UDim.new(0, 5)
local ListBox = Util.Instance("Frame", Container)
ListBox.AnchorPoint = Vector2.new(0, 0)
ListBox.Position = UDim2.new(0, 0, 0, 0)
ListBox.Size = UDim2.new(1, 0, 0, 26)
ListBox.BackgroundTransparency = 0
ListBox.BackgroundColor3 = Color3.new(0.7, 0.7, 0.7)
ListBox.BorderSizePixel = 0
ListBox.AutomaticSize = Enum.AutomaticSize.Y
Stylize(ListBox, {
Depthed = true,
})
Padding = Util.Instance("UIPadding", ListBox)
Padding.PaddingTop = UDim.new(0, 5)
Padding.PaddingBottom = UDim.new(0, 5)
Padding.PaddingLeft = UDim.new(0, 0)
Padding.PaddingRight = UDim.new(0, 0)
local UIList = Util.Instance("UIListLayout", ListBox)
UIList.FillDirection = Enum.FillDirection.Vertical
UIList.HorizontalAlignment = Enum.HorizontalAlignment.Center
UIList.VerticalAlignment = Enum.VerticalAlignment.Top
UIList.Padding = UDim.new(0, 0)
UIList.SortOrder = Enum.SortOrder.LayoutOrder
Util.LinkDestroyI2I(ListBox, Container)
return ListBox
end
function UI.CreateScrollCanvas(parent, height)
local margin = 5
local Container = Util.Instance("Frame", parent)
Container.AnchorPoint = Vector2.new(0.5, 0)
Container.Size = UDim2.new(1, 0, 0, height)
Container.BackgroundTransparency = 1
Container.LayoutOrder = #parent:GetChildren()
local Padding = Util.Instance("UIPadding", Container)
Padding.PaddingTop = UDim.new(0, 2)
Padding.PaddingBottom = UDim.new(0, 2)
Padding.PaddingLeft = UDim.new(0, 5)
Padding.PaddingRight = UDim.new(0, 5)
local ListBox = Util.Instance("ScrollingFrame", Container)
ListBox.AnchorPoint = Vector2.new(0, 0)
ListBox.Position = UDim2.new(0, 0, 0, 0)
ListBox.Size = UDim2.new(1, 0, 0, 26)
ListBox.BackgroundTransparency = 0
ListBox.BackgroundColor3 = Color3.new(0.7, 0.7, 0.7)
ListBox.BorderSizePixel = 0
ListBox.AutomaticCanvasSize = Enum.AutomaticSize.Y
ListBox.CanvasSize = UDim2.new(0, 0, 0, 0)
ListBox.ClipsDescendants = true
ListBox.ScrollingDirection = Enum.ScrollingDirection.Y
ListBox.ScrollBarThickness = 3
ListBox.ElasticBehavior = Enum.ElasticBehavior.Always
ListBox.TopImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
ListBox.MidImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
ListBox.BottomImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
ListBox.ScrollBarImageTransparency = 0.5
ListBox.ScrollBarImageColor3 = UITextColor.Value
Util.LinkDestroyI2C(ListBox, UITextColor.Changed:Connect(function(val)
ListBox.ScrollBarImageColor3 = val
end))
Stylize(ListBox, {
Depthed = true,
})
Padding = Util.Instance("UIPadding", ListBox)
Padding.PaddingTop = UDim.new(0, 5)
Padding.PaddingBottom = UDim.new(0, 5)
Padding.PaddingLeft = UDim.new(0, 0)
Padding.PaddingRight = UDim.new(0, 0)
local UIList = Util.Instance("UIListLayout", ListBox)
UIList.FillDirection = Enum.FillDirection.Vertical
UIList.HorizontalAlignment = Enum.HorizontalAlignment.Center
UIList.VerticalAlignment = Enum.VerticalAlignment.Top
UIList.Padding = UDim.new(0, 0)
UIList.SortOrder = Enum.SortOrder.LayoutOrder
Util.LinkDestroyI2I(ListBox, Container)
return ListBox
end
function UI.CreateItemListPage()
local margin = 5
local Frame = Util.Instance("Frame", WindowContent)
Frame.AnchorPoint = Vector2.new(0.5, 0.5)
Frame.Position = UDim2.new(0.5, 0, 0.5, 0)
Frame.Size = UDim2.new(0, 360, 0, 205)
Frame.BackgroundTransparency = 0
Frame.BackgroundColor3 = Color3.new(0, 0, 0)
Frame.BorderSizePixel = 1
Frame.BorderColor3 = Color3.new(1, 1, 1)
Frame.Visible = true
Frame.ZIndex = 0
Frame.ClipsDescendants = true
AddToRenderStep(function(t)
Frame.BorderColor3 = GetUIColor(t)
Frame.BackgroundColor3 = GetUIBGColor(t)
end, Frame)
local Padding = Util.Instance("UIPadding", Frame)
Padding.PaddingTop = UDim.new(0, margin)
Padding.PaddingBottom = UDim.new(0, margin)
Padding.PaddingLeft = UDim.new(0, margin)
Padding.PaddingRight = UDim.new(0, margin)
local BackButton = Util.Instance("TextButton", Frame)
BackButton.AnchorPoint = Vector2.new(0, 0)
BackButton.Position = UDim2.new(0, 0, 0, 0)
BackButton.Size = UDim2.new(0, 30, 0, 25)
BackButton.BackgroundTransparency = 0
BackButton.BackgroundColor3 = Color3.new(1, 1, 1)
BackButton.BorderSizePixel = 0
BackButton.Text = ""
BackButton.AutoButtonColor = true
local BackButtonText = Util.Instance("TextLabel", BackButton)
BackButtonText.AnchorPoint = Vector2.new(0.5, 0.5)
BackButtonText.Position = UDim2.new(0.5, 0, 0.5, 0)
BackButtonText.Size = UDim2.new(1, margin * -2, 1, -margin)
BackButtonText.BackgroundTransparency = 1
BackButtonText.Font = Enum.Font.Code
BackButtonText.TextColor3 = Color3.new(1, 1, 1)
BackButtonText.TextTransparency = 0
BackButtonText.TextXAlignment = Enum.TextXAlignment.Center
BackButtonText.TextYAlignment = Enum.TextYAlignment.Center
BackButtonText.TextWrapped = true
BackButtonText.TextSize = 20
BackButtonText.Text = "<"
RegisterTextLabel(BackButtonText)
Stylize(BackButton)
local SearchBox = Util.Instance("Frame", Frame)
SearchBox.AnchorPoint = Vector2.new(1, 0)
SearchBox.Position = UDim2.new(1, 0, 0, 0)
SearchBox.Size = UDim2.new(1, -margin - 30, 0, 25)
SearchBox.BackgroundTransparency = 0
SearchBox.BackgroundColor3 = Color3.new(0.9, 0.9, 0.9)
SearchBox.BorderSizePixel = 0
local SearchBoxText = Util.Instance("TextBox", SearchBox)
SearchBoxText.AnchorPoint = Vector2.new(0.5, 0.5)
SearchBoxText.Position = UDim2.new(0.5, 0, 0.5, 0)
SearchBoxText.Size = UDim2.new(1, margin * -2, 1, -margin)
SearchBoxText.BackgroundTransparency = 1
SearchBoxText.Font = Enum.Font.Code
SearchBoxText.TextColor3 = Color3.new(1, 1, 1)
SearchBoxText.PlaceholderColor3 = Color3.new(0.7, 0.7, 0.7)
SearchBoxText.TextTransparency = 0
SearchBoxText.TextXAlignment = Enum.TextXAlignment.Left
SearchBoxText.TextYAlignment = Enum.TextYAlignment.Center
SearchBoxText.TextWrapped = true
SearchBoxText.TextSize = 20
SearchBoxText.ClearTextOnFocus = false
SearchBoxText.Focused:Connect(function()
UISound.Click:Play()
end)
Stylize(SearchBox, {
Depthed = true,
})
SearchBoxText.Text = ""
SearchBoxText.PlaceholderText = "Seek..."
RegisterTextLabel(SearchBoxText)
local ListBox = Util.Instance("ScrollingFrame", Frame)
ListBox.AnchorPoint = Vector2.new(0, 0)
ListBox.Position = UDim2.new(0, 0, 0, 25 + margin)
ListBox.Size = UDim2.new(1, 0, 1, -margin - 25)
ListBox.BackgroundTransparency = 0
ListBox.BackgroundColor3 = Color3.new(0.7, 0.7, 0.7)
ListBox.BorderSizePixel = 0
ListBox.AutomaticCanvasSize = Enum.AutomaticSize.Y
ListBox.CanvasSize = UDim2.new(0, 0, 0, 0)
ListBox.ClipsDescendants = true
ListBox.ScrollingDirection = Enum.ScrollingDirection.Y
ListBox.ScrollBarThickness = 3
ListBox.ElasticBehavior = Enum.ElasticBehavior.Always
ListBox.TopImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
ListBox.MidImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
ListBox.BottomImage = "rbxasset://textures/ui/Scroll/scroll-middle.png"
ListBox.ScrollBarImageTransparency = 0.5
ListBox.ScrollBarImageColor3 = UITextColor.Value
Util.LinkDestroyI2C(ListBox, UITextColor.Changed:Connect(function(val)
ListBox.ScrollBarImageColor3 = val
end))
Stylize(ListBox, {
Depthed = true,
})
Padding = Util.Instance("UIPadding", ListBox)
Padding.PaddingTop = UDim.new(0, 5)
Padding.PaddingBottom = UDim.new(0, 5)
Padding.PaddingLeft = UDim.new(0, 0)
Padding.PaddingRight = UDim.new(0, 0)
local UIList = Util.Instance("UIListLayout", ListBox)
UIList.FillDirection = Enum.FillDirection.Vertical
UIList.HorizontalAlignment = Enum.HorizontalAlignment.Center
UIList.VerticalAlignment = Enum.VerticalAlignment.Top
UIList.Padding = UDim.new(0, 0)
UIList.SortOrder = Enum.SortOrder.LayoutOrder
BackButton.Name = "Back"
BackButtonText.Name = "Label"
SearchBox.Name = "Search"
SearchBoxText.Name = "Box"
ListBox.Name = "List"
SearchBoxText:GetPropertyChangedSignal("Text"):Connect(function()
for _,v in ListBox:GetChildren() do
if v:IsA("GuiObject") then
v.Visible = not not v.Name:lower():find(SearchBoxText.Text:lower())
end
end
end)
return Frame
end
function UI.CreateItemListItem(parent)
local margin = 5
local Container = Util.Instance("Frame", parent)
Container.AnchorPoint = Vector2.new(0.5, 0)
Container.Size = UDim2.new(1, 0, 0, 30)
Container.BackgroundTransparency = 1
Container.LayoutOrder = #parent:GetChildren()
Container.AutomaticSize = Enum.AutomaticSize.Y
local Padding = Util.Instance("UIPadding", Container)
Padding.PaddingTop = UDim.new(0, 2)
Padding.PaddingBottom = UDim.new(0, 2)
Padding.PaddingLeft = UDim.new(0, 5)
Padding.PaddingRight = UDim.new(0, 5)
local ListBox = Util.Instance("TextButton", Container)
ListBox.AnchorPoint = Vector2.new(0, 0)
ListBox.Position = UDim2.new(0, 0, 0, 0)
ListBox.Size = UDim2.new(1, 0, 0, 26)
ListBox.BackgroundTransparency = 0
ListBox.BackgroundColor3 = Color3.new(0.7, 0.7, 0.7)
ListBox.BorderSizePixel = 0
ListBox.AutomaticSize = Enum.AutomaticSize.Y
ListBox.Text = ""
Stylize(ListBox)
Padding = Util.Instance("UIPadding", ListBox)
Padding.PaddingTop = UDim.new(0, 5)
Padding.PaddingBottom = UDim.new(0, 5)
Padding.PaddingLeft = UDim.new(0, 0)
Padding.PaddingRight = UDim.new(0, 0)
local UIList = Util.Instance("UIListLayout", ListBox)
UIList.FillDirection = Enum.FillDirection.Vertical
UIList.HorizontalAlignment = Enum.HorizontalAlignment.Center
UIList.VerticalAlignment = Enum.VerticalAlignment.Top
UIList.Padding = UDim.new(0, 0)
UIList.SortOrder = Enum.SortOrder.LayoutOrder
Util.LinkDestroyI2I(ListBox, Container)
return ListBox
end
local MainPage = UI.CreatePage()
MainPage.Interactable = false
CracktroFrame.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
if _totalrendertime < 1 or not IsUhhhhhhFullyLoaded then return end
CracktroFrame.Interactable = false
CracktroFrame.Visible = true
MainPage.Interactable = false
local tween = TweenService:Create(CracktroFrame, TweenInfo.new(0.5, Enum.EasingStyle.Cubic, Enum.EasingDirection.Out), {
Position = UDim2.new(0.5, -362, 0.5, 0),
})
tween:Play()
tween.Completed:Connect(function()
CracktroFrame.Visible = false
MainPage.Interactable = true
end)
end
end)
local AsciiText = UI.CreateText(MainPage, "", 12, Enum.TextXAlignment.Center)
Util.ForceTextSize(AsciiText)
task.spawn(function()
local AsciiTextarts = {
{
" ____ ___.__ .__ .__ .__ .__ .__ ",
" | | \\ |__ | |__ | |__ | |__ | |__ | |__ ",
" | | / | \\| | \\| | \\| | \\| | \\| | \\ ",
" | | /| Y \\ Y \\ Y \\ Y \\ Y \\ Y \\ ",
" |______/ |___| /___| /___| /___| /___| /___| / ",
" \\/ \\/ \\/ \\/ \\/ \\/ ",
},
{
" _ _ _ _ _ _ _ _ ",
" | | | | | | | | | | | | | | | ",
" | | | | |__ | |__ | |__ | |__ | |__ | |__ ",
" | | | | '_ \\| '_ \\| '_ \\| '_ \\| '_ \\| '_ \\ ",
" | |_| | | | | | | | | | | | | | | | | | | | ",
" \\___/|_| |_|_| |_|_| |_|_| |_|_| |_|_| |_| ",
},
{
" ( ( /( ( /( ( /( ( /( ( /( ( /( ",
" )\\ )\\()) )\\()) )\\()) )\\()) )\\()) )\\()) ",
" _ ((_)((_)\\ ((_)\\ ((_)\\ ((_)\\ ((_)\\ ((_)\\ ",
" | | | || |(_)| |(_)| |(_)| |(_)| |(_)| |(_) ",
" | |_| || ' \\ | ' \\ | ' \\ | ' \\ | ' \\ | ' \\ ",
" \\___/ |_||_||_||_||_||_||_||_||_||_||_||_| ",
},
{
" db db db db db db db db ",
" 88 88 88 88 88 88 88 88 ",
" 88 88 888888. 888888. 888888. 888888. 888888. 888888. ",
" 88 88 88 88 88 88 88 88 88 88 88 88 88 88 ",
" 88. .88 88 88 88 88 88 88 88 88 88 88 88 88 ",
" Y8888P YP YP YP YP YP YP YP YP YP YP YP YP ",
},
{
" Un iv er sa lH ie ra rc ",
" hi ca l6 Re an im at eB ",
" yS TE VETHERE ALONEUn iversal Hierarc hical6R eanimat ",
" eB yS TE VE TH ER EA LO NE Un iv er sa lH ",
" ier arc ic al 6R ea ni ma te By ST EV ET HE ",
" REALON EU ni ve rs al Hi er ar ch ic al 6R ",
},
{
"animatio' .jQQQ|;;;;;;;;;;;;;|QQWp, 'tionanim",
"ationan' .JTTVV|;;;;;;;;;;;;;|VVVVm> 'nimatio",
"nanima' _mQc;~~|.............|~~+jQmc 'ionani",
"matio' _QQQQg, | | jQQQQc. 'imati",
"onan' <QQQQQQm;| Uhhhhhh |.wQQQQWQa, 'onan",
"ima' jWQQQQQQQQ| |mQQQQQQQQg, 'mat",
},
{
"fore! It is really great! Good product! Feel alive, NO",
"st part^ '' ' \"\"*E! (excluding taxes and the bills) N",
"r seu- . Uhhhhhh .-|u ihis! It has become something ne",
"rse! We ,... . ,.-rs of yellow-orange shiny triangles.",
"ns at a really stable framerate, so optimised it handl",
"ow, BUY OUR PRODUCT FOR FREE! We know you like it! We ",
},
{
"....... gmWWWQQQQQQPg ..............................",
":;:;:; qm#WWNWQQWQWWmp ;:;:;:. .;:;",
"!!?!!?.WX##: W#W :###W.?!!?:. hi im steve! .:!",
"lilili:ZSXS: XSX :X##Z:ilil!. welcome to Uhhhhhh .!i",
"EEEEEE:YLkk2S2SXSXSXZP:EEEEEi: :iEE",
"%%%%%%%;vnvkkkk2S2vnv;%%%%%%%%%oooooooooooooooo%%%%%",
},
{
" Get Uhhhhhh today! Feel the difference! ",
" (-_-) EPIC! (^~^) .vv=E ",
" ()-(:::::)-() .()-(:::::)-()' ",
"LAME! || |.....| || 3=^^' /...../ ",
" YP | | YP ( ) COOL! ",
" Without Uhhhhhh vs. With Uhhhhhh ",
},
{
"55 68 68 68 68 68 68 55 68 68 68 68 68 68",
"68 68 68 68 68 68 55 68 68 68 68 68 68 55",
"68 68 68 68 68 55 68 68 68 68 68 68 55 68",
"68 68 68 68 Uhhhhhh 68 68 68 68 55 68 68",
"68 68 68 55 68 68 68 68 68 68 55 68 68 68",
"68 68 55 68 68 68 68 68 68 55 68 68 68 68",
},
{
" Uhhhhhh ",
" 01010101 ",
" 01101000 ",
" 01101000 ",
" 01101000 ",
" 01101000 ",
" 01101000 ",
" 01101000 ",
" Uhhhhhh ",
},
{
"+-[ Uhhhhhh Reanimate ]-----------------[#]-+",
"| ___ |",
"| / o \\ Hello, world! Programmed to |",
"| \\ l / work and not to feel. |",
"| \"\"\" |",
"+-------------------------------------------+",
},
{
" cIyyyyyyF0\\ `TFyyyyyyq8_ ",
" i+`}0v V!'xD~ ",
" &x~[. W|11 --Uhhhhhh-- ",
" ~W, }D ",
" <d$- tg3` ",
" \".'' ...... '. \"` ; ",
" 2]~<J ;!ci2q' rrrr^ <1_q' -inr `0; ",
" F` '2 F<; [&I- _+r%) `@<}! ",
" ~1}` `}\\ ;*111*; ^[; .^ +\\ `x ",
},
{
" local oldsec = 0 .-+=* Uhhhhhh *=+-. ",
" while i < #keyframes do (code-ception!) ",
" local k = keyframes[i] ",
" local sec = k.Time // self._optimiser ",
" while oldsec < sec do ",
" local j = math.max(1, i - 1) ",
},
{
"er failed to process http://assetgame.roblox.com/as",
"er failed to process http://assetgame.roblox.com/as",
"-------------------------------------------- ",
"so, Uhhhhhh... ",
"-------------------------------------------- ",
"er failed to process http://assetgame.roblox.com/as",
"er failed to process http://assetgame.roblox.com/as",
"er failed to process http://assetgame.roblox.com/as",
},
{
"usage: clone this repo and change the token and the",
"(unless you like chaos) also make sure you have all",
"the dev portal cuz Uhhhhhh. ",
" ",
"\"it's not fast it's shit\" ",
"Believe me friend, its fuckingly fast, you don't ev",
},
{
"Uhhhhhh https://discord.gg/NASNUKRBVM Uhhhhhh",
"Uhhhhhh Uhhhhhh Uhhhhhh Uhhhhhh STEVETHEREALONE",
"Uhhhhhh Uhhhhhh Uhhhhhh STEVETHEREALONE Uhhhhhh",
"Uhhhhhh Uhhhhhh STEVETHEREALONE Uhhhhhh Uhhhhhh",
"Uhhhhhh STEVETHEREALONE Uhhhhhh Uhhhhhh Uhhhhhh",
"STEVETHEREALONE Uhhhhhh Uhhhhhh Uhhhhhh Uhhhhhh",
},
}
AsciiText.Text = table.concat(AsciiTextarts[math.random(1, #AsciiTextarts)], "\n")
local AsciiTextartsw = false
local AsciiTextarttr = {}
do
local a = {}
for i=0, 59 do
local t = i / 60
t *= 5
t = (t - 1) / 3
t *= 5
local map = {}
for y=0, 64 do
local layer = {}
for x=0, 64 do
local prog = x / 64
prog *= 5
table.insert(layer, math.round(math.clamp(t - prog + math.random() * 0.2, 0, 1) * 3))
end
table.insert(map, layer)
end
table.insert(a, map)
task.wait()
end
table.insert(AsciiTextarttr, a)
table.insert(AsciiTextarttr, a)
table.insert(AsciiTextarttr, a)
table.insert(AsciiTextarttr, a)
a = {}
for i=0, 59 do
local t = i / 60
local map = {}
for y=0, 64 do
local layer = {}
for x=0, 64 do
table.insert(layer, math.round(math.clamp(t * 2 - 1 + math.random() * 0.8, 0, 1) * 3))
end
table.insert(map, layer)
end
table.insert(a, map)
task.wait()
end
table.insert(AsciiTextarttr, a)
a = {}
for i=0, 59 do
local t = i / 60
t *= 5
local map = {}
for y=0, 64 do
local layer = {}
for x=0, 64 do
local dist = math.sqrt(math.pow(x - 32, 2) + math.pow(y - 32, 2)) / 64
dist *= 5
table.insert(layer, math.round(math.clamp(t - dist + math.random() * 0.2, 0, 1) * 3))
end
table.insert(map, layer)
end
table.insert(a, map)
task.wait()
end
table.insert(AsciiTextarttr, a)
a = {}
for i=0, 59 do
local t = 1 - i / 60
t *= 5
t -= 1
local map = {}
for y=0, 64 do
local layer = {}
for x=0, 64 do
local dist = math.sqrt(math.pow(x - 32, 2) + math.pow(y - 32, 2)) / 64
dist *= 5
table.insert(layer, math.round(math.clamp(dist - t + math.random() * 0.2, 0, 1) * 3))
end
table.insert(map, layer)
end
table.insert(a, map)
task.wait()
end
table.insert(AsciiTextarttr, a)
end
local function switchart()
if AsciiTextartsw then return end
AsciiTextartsw = true
local function animation(art, inv)
local transmap = AsciiTextarttr[math.random(1, #AsciiTextarttr)]
local rot = math.random(0, 3)
local st = os.clock()
repeat
local t = os.clock() - st
local i = math.clamp(math.floor(t * 60) + 1, 1, 60)
local render = {}
for iy=1, #art do
local y = (iy - 1) / #art
local conc = ""
local txt = art[iy]
for ix=1, #txt do
local x = (ix - 1) / #txt
local ch = string.sub(txt, ix, ix)
local b = 0
if rot == 0 then
b = transmap[i][math.floor(y * 64) + 1][math.floor(x * 64) + 1]
elseif rot == 1 then
b = transmap[i][math.floor(x * 64) + 1][64 - math.floor(y * 64)]
elseif rot == 2 then
b = transmap[i][64 - math.floor(y * 64)][64 - math.floor(x * 64)]
elseif rot == 3 then
b = transmap[i][64 - math.floor(x * 64)][math.floor(y * 64) + 1]
end
if inv then b = 3 - b end
if b == 1 then
if (ch == ch:upper() and ch ~= ch:lower()) or ch == "8" or ch == "0" then
ch = "?"
elseif ch == ":" or ch == ";" or ch == "_" then
ch = "."
elseif ch == "." or ch == "," or ch == " " then
ch = " "
else
ch = ":"
end
elseif b == 2 then
if (ch == ch:upper() and ch ~= ch:lower()) or ch == "8" or ch == "0" then
ch = ":"
elseif ch == ":" or ch == ";" or ch == "_" or ch == "." or ch == "," or ch == " " then
ch = " "
else
ch = "."
end
elseif b == 3 then
ch = " "
end
conc ..= ch
end
table.insert(render, conc)
end
AsciiText.Text = table.concat(render, "\n")
task.wait()
until os.clock() > st + 1
end
local source = string.split(AsciiText.Text, "\n")
local target = source
while table.concat(source, "\n") == table.concat(target, "\n") do
task.wait()
target = AsciiTextarts[math.random(1, #AsciiTextarts)]
end
animation(source, false)
animation(target, true)
AsciiText.Text = table.concat(target, "\n")
AsciiTextartsw = false
end
local AsciiTextartin = nil
AsciiText.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
AsciiTextartin = input
end
end)
AsciiText.InputEnded:Connect(function(input)
if AsciiTextartin == input then
AsciiTextartin = nil
switchart()
end
end)
switchart()
end)
UI.CreateText(MainPage, `Reanimate V{UhhhhhhVersion}, By STEVE :D`, 15, Enum.TextXAlignment.Right)
UI.CreateSeparator(MainPage)
UI.CreateButton(MainPage, " < Back to cool scene", 20).Activated:Connect(function()
CracktroFrame.Interactable = false
CracktroFrame.Visible = true
MainPage.Interactable = false
local tween = TweenService:Create(CracktroFrame, TweenInfo.new(0.5, Enum.EasingStyle.Cubic, Enum.EasingDirection.In), {
Position = UDim2.new(0.5, 0, 0.5, 0),
})
tween:Play()
tween.Completed:Connect(function()
CracktroFrame.Interactable = true
end)
end)
UI.CreateSwitch(MainPage, "Skip Intro", SaveData.SkipIntro).Changed:Connect(function(value)
SaveData.SkipIntro = value
end)
UI.CreateDropdown(MainPage, "UI Theme", {
"RGB/Default",
"ALONE",
"Oxide",
"Patchma Hub",
"Genesis V4",
"Crimson",
"r/masterhacker",
"Homer Simpson",
"Immortality Lord",
"LIGHT RGB",
"LIGHT ALONE",
"Roserika",
"FastTracker II Blue",
"Cherry Blossom",
"Sakura",
"Tommorow Night 80s",
"User Defined (see README)",
}, SaveData.UITheme).Changed:Connect(function(val)
SaveData.UITheme = val
SetUITheme(SaveData.UITheme)
end)
UI.CreateSeparator(MainPage)
local MusicName = UI.CreateText(MainPage, "", 15, Enum.TextXAlignment.Center)
UI.CreateButton(MainPage, "Random UI Music", 20).Activated:Connect(function()
MusicPlayer.PlayMusic()
end)
local _musicnames = {"-- Choose --"}
for i=1, #MusicPlayer.Database do
local hi = MusicPlayer.Database[i]
table.insert(_musicnames, hi[2])
end
local MusicSelect = UI.CreateDropdown(MainPage, "UI Music", _musicnames, 1)
MusicSelect.Changed:Connect(function(val)
if val > 1 then
MusicSelect.Value = 1
MusicPlayer.PlayMusic(val - 1)
end
end)
UI.CreateSwitch(MainPage, math.random(8) == 1 and "Mute @Noober 67s" or "Mute UI Music", SaveData.MuteUIMusic).Changed:Connect(function(value)
SaveData.MuteUIMusic = value
end)
UI.CreateSwitch(MainPage, "Mute Reanim Music", SaveData.MuteReanimMusic).Changed:Connect(function(value)
SaveData.MuteReanimMusic = value
end)
UI.CreateSwitch(MainPage, "Mute Sounds", SaveData.MuteUISound).Changed:Connect(function(value)
SaveData.MuteUISound = value
if value then
UISound.Click.Volume = 0
else
UISound.Click.Volume = 1
end
end)
UI.CreateSeparator(MainPage)
UISound.MovesetMusic = Util.Instance("Sound", UIMainFrame)
UISound.MovesetMusic.Looped = true
UISound.MovesetMusic.PlaybackRegionsEnabled = false
UISound.MovesetMusic.Volume = 1
UISound.MovesetMusic.Name = "(unknown)"
UISound.MovesetMusic:SetAttribute("Volume", 1)
local function SetOverrideMovesetMusic(soundid, soundname, volume, region)
if soundid then
UISound.MovesetMusic.SoundId = soundid
UISound.MovesetMusic.Name = soundname or "(unknown)"
if volume ~= nil then
UISound.MovesetMusic:SetAttribute("Volume", volume)
else
UISound.MovesetMusic:SetAttribute("Volume", 1)
end
if region ~= nil then
UISound.MovesetMusic.PlaybackRegionsEnabled = true
UISound.MovesetMusic.LoopRegion = region
else
UISound.MovesetMusic.PlaybackRegionsEnabled = false
end
UISound.MovesetMusic.PlaybackSpeed = 1
UISound.MovesetMusic.TimePosition = 0
UISound.MovesetMusic:Play()
else
UISound.MovesetMusic:Stop()
end
end
local function GetOverrideMovesetMusicTime()
return UISound.MovesetMusic.TimePosition
end
local function SetOverrideMovesetMusicTime(t)
UISound.MovesetMusic.TimePosition = t
end
local function SetOverrideMovesetMusicSpeed(speed)
UISound.MovesetMusic.PlaybackSpeed = speed
end
UISound.DanceMusic = Util.Instance("Sound", UIMainFrame)
UISound.DanceMusic.Looped = true
UISound.DanceMusic.PlaybackRegionsEnabled = false
UISound.DanceMusic.Volume = 1
UISound.DanceMusic.Name = "(unknown)"
UISound.DanceMusic:SetAttribute("Volume", 1)
local function SetOverrideDanceMusic(soundid, soundname, volume, region)
if soundid then
UISound.DanceMusic.SoundId = soundid
UISound.DanceMusic.Name = soundname or "(unknown)"
if volume ~= nil then
UISound.DanceMusic:SetAttribute("Volume", volume)
else
UISound.DanceMusic:SetAttribute("Volume", 1)
end
if region ~= nil then
UISound.DanceMusic.PlaybackRegionsEnabled = true
UISound.DanceMusic.LoopRegion = region
else
UISound.DanceMusic.PlaybackRegionsEnabled = false
end
UISound.DanceMusic.PlaybackSpeed = 1
UISound.DanceMusic.TimePosition = 0
UISound.DanceMusic:Play()
else
UISound.DanceMusic:Stop()
end
end
local function GetOverrideDanceMusicTime()
return UISound.DanceMusic.TimePosition
end
local function SetOverrideDanceMusicTime(t)
UISound.DanceMusic.TimePosition = t
end
local function SetOverrideDanceMusicSpeed(speed)
UISound.DanceMusic.PlaybackSpeed = speed
end
local _MainMusicIsMuted = SaveData.MuteUIMusic
AddToRenderStep(function()
local musicname = UISound.Music.Name
local mustmute = SaveData.MuteUIMusic
if SaveData.MuteReanimMusic then
UISound.MovesetMusic.Volume = 0
UISound.DanceMusic.Volume = 0
else
if UISound.DanceMusic.IsPlaying then
mustmute = true
UISound.DanceMusic.Volume = UISound.DanceMusic:GetAttribute("Volume")
UISound.MovesetMusic.Volume = 0
musicname = UISound.DanceMusic.Name
elseif UISound.MovesetMusic.IsPlaying then
mustmute = true
UISound.MovesetMusic.Volume = UISound.MovesetMusic:GetAttribute("Volume")
musicname = UISound.MovesetMusic.Name
end
end
if _MainMusicIsMuted ~= mustmute then
_MainMusicIsMuted = mustmute
if mustmute then
UISound.Music.Volume = 0
else
UISound.Music.Volume = 1
end
end
MusicName.Text = `Current Music Playing:\n{musicname:gsub("&", "&"):gsub("<", "<"):gsub(">", ">")}`
end)
task.wait()
FallenPartsDestroyHeight = workspace.FallenPartsDestroyHeight
if FallenPartsDestroyHeight ~= FallenPartsDestroyHeight then
FallenPartsDestroyHeight = -500
end
local RejectCharacterDeletionsDisabled = false
pcall(function()
local rcd, _ = gethiddenproperty(workspace, "RejectCharacterDeletions")
if rcd.Name == "Disabled" then
RejectCharacterDeletionsDisabled = true
end
end)
local function CreateHumanoidCharacter()
local char = Util.Instance("Model")
char.Name = "(C) Uhhhhhh V" .. UhhhhhhVersion
local god = Util.Instance("ForceField", char)
god.Name = "heyy!! :33"
god.Visible = false
local hum = Util.Instance("Humanoid", char)
hum.Name = "Humanoid"
hum.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
hum.RequiresNeck = false
hum.BreakJointsOnDeath = false
hum.UseJumpPower = true
hum.WalkSpeed = 16
hum.JumpPower = 50
hum.Health = 100
hum.MaxHealth = 100
hum.MaxSlopeAngle = 89
hum.HipHeight = 0
hum.AutoRotate = true
hum:SetStateEnabled(Enum.HumanoidStateType.Dead, false)
local function makePart(name, size, pos)
local part = Util.Instance("Part", char)
part.Name = name
part.Size = size
part.Position = pos
part.Anchored = false
part.CanCollide = false
part.Transparency = 1
part.Reflectance = 0
part.Color = Color3.new(1, 0, 0)
part.CastShadow = false
part.TopSurface = Enum.SurfaceType.Smooth
part.BottomSurface = Enum.SurfaceType.Smooth
part.LeftSurface = Enum.SurfaceType.Smooth
part.RightSurface = Enum.SurfaceType.Smooth
part.FrontSurface = Enum.SurfaceType.Smooth
part.BackSurface = Enum.SurfaceType.Smooth
return part
end
local root = makePart("HumanoidRootPart", Vector3.new(2, 2, 1), Vector3.new(0, 0, 0))
local torso = makePart("Torso", Vector3.new(2, 2, 1), Vector3.new(0, 0, 0))
local head = makePart("Head", Vector3.new(2, 1, 1), Vector3.new(0, 1.5, 0))
local leftArm = makePart("Left Arm", Vector3.new(1, 2, 1), Vector3.new(-1.5, 0, 0))
local rightArm = makePart("Right Arm", Vector3.new(1, 2, 1), Vector3.new(1.5, 0, 0))
local leftLeg = makePart("Left Leg", Vector3.new(1, 2, 1), Vector3.new(-0.5, -2, 0))
local rightLeg = makePart("Right Leg", Vector3.new(1, 2, 1), Vector3.new(0.5, -2, 0))
local function makeMotor(name, p0, p1, c0, c1)
local motor = Instance.new("Motor6D", p0)
motor.Name = name
motor.Part0 = p0
motor.Part1 = p1
motor.C0 = c0
motor.C1 = c1
motor.MaxVelocity = 0
Util.LinkDestroyI2C(motor, RunService.PreRender:Connect(function()
local scale = char:GetScale()
motor:SetAttribute("Transform", Util.ScaleCFrame(motor.Transform, 1 / scale))
motor.Transform = Util.ScaleCFrame(motor:GetAttribute("Transform") or CFrame.identity, scale)
end))
end
makeMotor(
"RootJoint", root, torso,
CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0),
CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
)
makeMotor(
"Neck", torso, head,
CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0),
CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
)
makeMotor(
"Left Shoulder", torso, leftArm,
CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
)
makeMotor(
"Right Shoulder", torso, rightArm,
CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),
CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
)
makeMotor(
"Left Hip", torso, leftLeg,
CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
)
makeMotor(
"Right Hip", torso, rightLeg,
CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0),
CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
)
local headshape = Util.Instance("SpecialMesh", head)
headshape.Name = "Mesh"
headshape.MeshType = Enum.MeshType.Head
headshape.Scale = Vector3.new(1.25, 1.25, 1.25)
local face = Util.Instance("Decal", head)
face.Name = "face"
face.Texture = "rbxassetid://123572006339559"
face.Color3 = Color3.new(0, 0, 0)
local tshirt = Util.Instance("Decal", torso)
tshirt.Name = "triforce"
tshirt.Texture = "rbxassetid://101055520647223"
tshirt.Color3 = Color3.new(1, 1, 1)
Util.LinkDestroyI2C(char, RunService.PreRender:Connect(function()
face.Transparency = Util.GetTransparency(head)
tshirt.Transparency = Util.GetTransparency(torso)
end))
char.PrimaryPart = root
return char
end
local GameSettings = UserSettings():GetService("UserGameSettings")
SaveData.NoInfiniteJump = not not SaveData.NoInfiniteJump
SaveData.NoclipEnabled = not not SaveData.NoclipEnabled
SaveData.CtrlClickEnabled = not not SaveData.CtrlClickEnabled
SaveData.ClickFlingEnabled = not not SaveData.ClickFlingEnabled
SaveData.NoSmoothCam = not not SaveData.NoSmoothCam
SaveData.FirstPersonBody = not not SaveData.FirstPersonBody
SaveData.NoSeatSitEnabled = not SaveData.NoSeatSitEnabled
SaveData.ToolGrabEnabled = not not SaveData.ToolGrabEnabled
SaveData.ScaleGravityEnabled = not not SaveData.ScaleGravityEnabled
SaveData.CharacterScale = SaveData.CharacterScale or 1
SaveData.P2PCollision = not not SaveData.P2PCollision
SaveData.ShiftlockDisabled = not not SaveData.ShiftlockDisabled
SaveData.NoLoadAnimationHook = not not SaveData.NoLoadAnimationHook
SaveData.NoPhysicsRepRootPart = not not SaveData.NoPhysicsRepRootPart
SaveData.NetlessVelocity = SaveData.NetlessVelocity or 25.01
SaveData.UsePatchmaLikeNetless = not not SaveData.UsePatchmaLikeNetless
SaveData.UseAngularVelocity = not not SaveData.UseAngularVelocity
SaveData.PatchmaVoidFloat = not not SaveData.PatchmaVoidFloat
SaveData.PlaceholderTransparency = SaveData.PlaceholderTransparency or 0.5
local _G_Uhhhhhh = {}
pcall(function() _G.Uhhhhhh = _G_Uhhhhhh end)
_G_Uhhhhhh.BindableEvent = Util.Instance("BindableEvent")
local Reanimate = {
Current = nil,
Character = nil,
CharacterLTMs = {},
Starting = false,
Stopping = false,
UseLoadAnimationHook = not SaveData.NoLoadAnimationHook,
UsePhysicsRepRootPart = not SaveData.NoPhysicsRepRootPart,
PhysicsRepRootPartFling = 1 / 10,
NetlessVelocity = SaveData.NetlessVelocity,
UsePatchmaLikeNetless = SaveData.UsePatchmaLikeNetless,
UseAngularVelocity = SaveData.UseAngularVelocity,
InfiniteJump = not SaveData.NoInfiniteJump,
Noclip = SaveData.NoclipEnabled,
CtrlClick = SaveData.CtrlClickEnabled,
ClickFling = SaveData.ClickFlingEnabled,
SmoothCam = not SaveData.NoSmoothCam,
FirstPersonBody = SaveData.FirstPersonBody,
SeatSit = not SaveData.NoSeatSitEnabled,
ToolGrab = SaveData.ToolGrabEnabled,
ScaleGravity = SaveData.ScaleGravityEnabled,
PatchmaVoidFloat = SaveData.PatchmaVoidFloat,
AntiExplosions = true,
CharacterScale = SaveData.CharacterScale,
PlaceholderTransparency = SaveData.PlaceholderTransparency,
P2PCollision = false,
ShiftlockEnabled = not SaveData.ShiftlockDisabled,
Shiftlocked = false,
ShouldRotationType = function(self)
if self.Camera:IsMouseLocked() and not self.Camera.Scriptable and self.Character then
local hum = self.Character:FindFirstChildOfClass("Humanoid")
if hum and hum.AutoRotate and hum.RootPart and not hum.RootPart:IsGrounded() then
local state = hum:GetState().Name
if table.find({"Running", "Jumping", "Freefall", "Landed", "Climbing"}, state) then
return true
end
end
end
return false
end,
Camera = {
CFrame = CFrame.identity,
Focus = CFrame.identity,
Scriptable = false,
VRMode = false,
FPSLocked = false,
Zoom = 16,
FieldOfView = 70,
Input = Vector3.zero,
_Zoom = 16,
OnReset = function(self)
self.Zoom = (self.Focus.Position - self.CFrame.Position).Magnitude
self._Zoom = self.Zoom
self.Scriptable = false
self.FPSLocked = false
self.FieldOfView = 70
self.Inputs:Reset()
end,
OnPanInput = function(self, vec, accum)
if accum then
self.Input += Vector3.new(vec.X, vec.Y, 0)
else
self.Input = Vector3.new(vec.X, vec.Y, self.Input.Z)
end
end,
OnZoomInput = function(self, zoom)
self.Input = Vector3.new(self.Input.X, self.Input.Y, zoom)
end,
Inputs = {
KB = {
Left = false,
Right = false,
},
MS = {
RMB = false,
},
TC = {
DJ = nil,
Touch = {},
LP = nil,
},
GP = {
DJ = Vector2.zero,
},
Reset = function(self)
self.KB.Left = false
self.KB.Right = false
self.MS.RMB = false
self.TC.DJ = nil
table.clear(self.TC.Touch)
self.TC.LP = nil
self.GP.DJ = Vector2.zero
end,
},
},
LocalTransparencyModifier = 0,
Control = {
Move = Vector3.zero,
Jump = false,
Inputs = {
KB = {
Up = false,
Down = false,
Left = false,
Right = false,
Space = false,
},
TC = {
DJ = nil,
LP = nil,
JB = nil,
},
GP = {
DJ = Vector2.zero,
JB = false,
},
Reset = function(self)
self.KB.Up = false
self.KB.Down = false
self.KB.Left = false
self.KB.Right = false
self.KB.Space = false
self.TC.DJ = nil
self.TC.LP = nil
self.TC.JB = nil
self.GP.DJ = Vector2.zero
self.GP.JB = false
end,
}
}
}
Reanimate.Camera.IsFirstPerson = function(self)
return self.Zoom < 0.75
end
Reanimate.Camera.IsMouseLocked = function(self)
return self:IsFirstPerson() or Reanimate.Shiftlocked
end
Reanimate.Camera.IsMousePanning = function(self)
return self:IsMouseLocked() or self.Inputs.MS.RMB
end
Reanimate.Camera.GetMovementCFrame = function(self)
local ccf = Reanimate.Camera.CFrame
if Reanimate.Camera.VRMode then
local _,y,_ = VRService:GetUserCFrame(Enum.UserCFrame.Head):ToEulerAngles(Enum.RotationOrder.YXZ)
ccf *= CFrame.Angles(0, y, 0)
end
return ccf
end
do
local thumbstickAreaTopLeft = nil
local thumbstickAreaBottomRight = nil
local jumpButtonTopLeft = nil
local jumpButtonBottomRight = nil
local function IsInArea(pos, tl, br)
return pos.X >= tl.X and pos.Y >= tl.Y and pos.X <= br.X and pos.Y <= br.Y
end
local function WillSinkToWorld(pos)
local playerGui = Player:FindFirstChildOfClass("PlayerGui")
local touchGui
if playerGui then
touchGui = playerGui:FindFirstChild("TouchGui")
end
local corestuff = CoreGui:GetGuiObjectsAtPosition(pos.X, pos.Y)
for _,v in corestuff do
if Util.WillGuiSinkInput(v) then
return false
end
end
local plrstuff = playerGui:GetGuiObjectsAtPosition(pos.X, pos.Y)
for _,v in plrstuff do
if v:IsDescendantOf(touchGui) then
return true
end
if Util.WillGuiSinkInput(v) then
return false
end
end
return true
end
local function IsInThumbstickArea(pos)
local playerGui = Player:FindFirstChildOfClass("PlayerGui")
if playerGui then
local touchGui = playerGui:FindFirstChild("TouchGui")
if touchGui and touchGui.Enabled then
local touchFrame = touchGui and touchGui:FindFirstChild("TouchControlFrame")
local thumbstickFrame = touchFrame and (touchFrame:FindFirstChild("DynamicThumbstickFrame") or touchFrame:FindFirstChild("ThumbstickFrame"))
if thumbstickFrame then
thumbstickAreaTopLeft = thumbstickFrame.AbsolutePosition
thumbstickAreaBottomRight = thumbstickAreaTopLeft + thumbstickFrame.AbsoluteSize
end
end
end
if thumbstickAreaTopLeft and thumbstickAreaBottomRight then
return IsInArea(pos, thumbstickAreaTopLeft, thumbstickAreaBottomRight)
end
return false
end
local function IsInJumpButtonArea(pos)
local playerGui = Player:FindFirstChildOfClass("PlayerGui")
if playerGui then
local touchGui = playerGui:FindFirstChild("TouchGui")
if touchGui and touchGui.Enabled then
local touchFrame = touchGui and touchGui:FindFirstChild("TouchControlFrame")
local jumpButton = touchFrame and touchFrame:FindFirstChild("JumpButton")
if jumpButton then
jumpButtonTopLeft = jumpButton.AbsolutePosition
jumpButtonBottomRight = jumpButtonTopLeft + jumpButton.AbsoluteSize
end
end
end
if jumpButtonTopLeft and jumpButtonBottomRight then
return IsInArea(pos, jumpButtonTopLeft, jumpButtonBottomRight)
end
return false
end
do
local self = Reanimate.Control
UserInputService.InputBegan:Connect(function(input, gpe)
if GuiService.MenuIsOpen then return end
if UserInputService:GetFocusedTextBox() then return end
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.W then
self.Inputs.KB.Up = true
end
if input.KeyCode == Enum.KeyCode.S then
self.Inputs.KB.Down = true
end
if input.KeyCode == Enum.KeyCode.Up then
self.Inputs.KB.Up = true
end
if input.KeyCode == Enum.KeyCode.Down then
self.Inputs.KB.Down = true
end
if input.KeyCode == Enum.KeyCode.A then
self.Inputs.KB.Left = true
end
if input.KeyCode == Enum.KeyCode.D then
self.Inputs.KB.Right = true
end
if input.KeyCode == Enum.KeyCode.Space then
self.Inputs.KB.Space = true
end
end
if input.KeyCode == Enum.KeyCode.ButtonA then
self.Inputs.GP.JB = true
end
if input.UserInputType == Enum.UserInputType.Touch and WillSinkToWorld(input.Position) then
if self.Inputs.TC.DJ == nil and IsInThumbstickArea(input.Position) then
self.Inputs.TC.DJ = input
self.Inputs.TC.LP = input.Position
return
end
if self.Inputs.TC.JB == nil and IsInJumpButtonArea(input.Position) then
self.Inputs.TC.JB = input
return
end
end
end)
UserInputService.InputChanged:Connect(function(input, gpe)
if GuiService.MenuIsOpen then return end
if UserInputService:GetFocusedTextBox() then return end
if input.KeyCode == Enum.KeyCode.Thumbstick1 then
self.Inputs.GP.DJ = Vector2.new(input.Position.X, -input.Position.Y)
end
end)
UserInputService.InputEnded:Connect(function(input)
if GuiService.MenuIsOpen then return end
if UserInputService:GetFocusedTextBox() then return end
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.W then
self.Inputs.KB.Up = false
end
if input.KeyCode == Enum.KeyCode.S then
self.Inputs.KB.Down = false
end
if input.KeyCode == Enum.KeyCode.Up then
self.Inputs.KB.Up = false
end
if input.KeyCode == Enum.KeyCode.Down then
self.Inputs.KB.Down = false
end
if input.KeyCode == Enum.KeyCode.A then
self.Inputs.KB.Left = false
end
if input.KeyCode == Enum.KeyCode.D then
self.Inputs.KB.Right = false
end
if input.KeyCode == Enum.KeyCode.Space then
self.Inputs.KB.Space = false
end
end
if input.KeyCode == Enum.KeyCode.ButtonA then
self.Inputs.GP.JB = false
end
if input.UserInputType == Enum.UserInputType.Touch then
if self.Inputs.TC.DJ == input then
self.Inputs.TC.DJ = nil
self.Inputs.TC.LP = nil
elseif self.Inputs.TC.JB == input then
self.Inputs.TC.JB = nil
end
end
if input.KeyCode == Enum.KeyCode.Thumbstick1 then
self.Inputs.GP.DJ = Vector2.zero
end
end)
local function resetInputDevices()
self.Inputs:Reset()
end
UserInputService.WindowFocused:Connect(resetInputDevices)
UserInputService.WindowFocusReleased:Connect(resetInputDevices)
UserInputService.TextBoxFocusReleased:Connect(resetInputDevices)
GuiService.MenuOpened:Connect(resetInputDevices)
RunService:BindToRenderStep("Uhhhhhh_Control", Enum.RenderPriority.Input.Value + 1, function(dt)
if UserInputService:GetFocusedTextBox() then
resetInputDevices()
end
local screensize = Util.GetScreenSize()
self.Move = Vector3.zero
if self.Inputs.KB.Up then
self.Move += Vector3.new(0, 0, -1)
end
if self.Inputs.KB.Down then
self.Move += Vector3.new(0, 0, 1)
end
if self.Inputs.KB.Left then
self.Move += Vector3.new(-1, 0, 0)
end
if self.Inputs.KB.Right then
self.Move += Vector3.new(1, 0, 0)
end
if self.Inputs.TC.DJ and self.Inputs.TC.LP then
local stickrad = 40
if math.min(screensize.X, screensize.Y) < 500 then
stickrad = 20
end
local dir = (self.Inputs.TC.DJ.Position - self.Inputs.TC.LP) / stickrad
if dir.Magnitude > 0.05 then
dir = dir.Unit * math.min(1, (dir.Magnitude - 0.05) / (1 - 0.05))
self.Move += Vector3.new(dir.X, 0, dir.Y)
end
end
if self.Inputs.GP.DJ.Magnitude > 0.2 then
self.Move += Vector3.new(self.Inputs.GP.DJ.X, 0, self.Inputs.GP.DJ.Y)
end
if self.Move.Magnitude > 1 then self.Move = self.Move.Unit end
self.Jump = false
if self.Inputs.KB.Space then
self.Jump = true
end
if self.Inputs.TC.JB then
self.Jump = true
end
if self.Inputs.GP.JB then
self.Jump = true
end
end)
end
do
local self = Reanimate.Camera
local function AdjustTouchPitchSensitivity(delta)
local pitch = Camera.CFrame:ToEulerAnglesYXZ()
if delta.Y * pitch >= 0 then
return delta
end
local curveY = 1 - (2 * math.abs(pitch) / math.pi) ^ 0.75
local sensitivity = curveY * 0.75 + 0.25
return Vector2.new(1, sensitivity) * delta
end
local thumbstickCurve do
local K_CURVATURE = 2
local K_DEADZONE = 0.1
function thumbstickCurve(x)
local fDeadzone = (math.abs(x) - K_DEADZONE)/(1 - K_DEADZONE)
local fCurve = (math.exp(K_CURVATURE*fDeadzone) - 1)/(math.exp(K_CURVATURE) - 1)
return math.sign(x)*math.clamp(fCurve, 0, 1)
end
end
UserInputService.InputBegan:Connect(function(input, gpe)
if GuiService.MenuIsOpen then return end
if UserInputService:GetFocusedTextBox() then return end
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.LeftShift or input.KeyCode == Enum.KeyCode.RightShift then
Reanimate.Shiftlocked = Reanimate.ShiftlockEnabled and not Reanimate.Shiftlocked
end
if input.KeyCode == Enum.KeyCode.Left then
self.Inputs.KB.Left = true
end
if input.KeyCode == Enum.KeyCode.Right then
self.Inputs.KB.Right = true
end
end
if input.KeyCode == Enum.KeyCode.ButtonL3 then
if self.VRMode then
if self.Zoom < 7 then
self.Zoom = 7
else
self.Zoom = 0.5
end
else
if self.Zoom <= 0.5 then
self.Zoom = 20
elseif self.Zoom <= 10 then
self.Zoom = 0.5
elseif self.Zoom <= 20 then
self.Zoom = 10
else
self.Zoom = 20
end
end
end
if input.KeyCode == Enum.KeyCode.ButtonR3 then
if self.VRMode then
VRService:RecenterUserHeadCFrame()
end
end
if input.UserInputType == Enum.UserInputType.MouseButton2 then
if gpe then return end
self.Inputs.MS.RMB = true
end
if input.UserInputType == Enum.UserInputType.Touch then
if gpe then return end
if self.Inputs.TC.DJ == nil and IsInThumbstickArea(input.Position) then
self.Inputs.TC.DJ = input
return
end
self.Inputs.TC.Touch[input] = true
end
end)
UserInputService.InputChanged:Connect(function(input, gpe)
if GuiService.MenuIsOpen then return end
if input.UserInputType == Enum.UserInputType.MouseMovement then
if self:IsMousePanning() then
self:OnPanInput(Vector2.new(input.Delta.X, input.Delta.Y) * Vector2.new(1, 0.77) * math.rad(0.5), false)
end
end
if input.UserInputType == Enum.UserInputType.MouseWheel then
if gpe then return end
self:OnZoomInput(-input.Position.Z)
end
if input.UserInputType == Enum.UserInputType.Touch then
if self.Inputs.TC.DJ == input then
return
end
local touches = {}
for touch,exist in self.Inputs.TC.Touch do
if exist then table.insert(touches, touch) end
end
if #touches == 1 then
if touches[1] == input then
self:OnPanInput(Vector2.new(input.Delta.X, input.Delta.Y) * Vector2.new(1, 0.66) * math.rad(1), true)
end
end
if #touches == 2 then
local pinch = (touches[1].Position - touches[2].Position).Magnitude
if self.Inputs.TC.LP then
local zoom = (self.Inputs.TC.LP - pinch) * 0.04
self:OnZoomInput(zoom)
end
self.Inputs.TC.LP = pinch
else
self.Inputs.TC.LP = nil
end
end
if input.KeyCode == Enum.KeyCode.Thumbstick2 then
self.Inputs.GP.DJ = Vector2.new(thumbstickCurve(input.Position.X), -thumbstickCurve(input.Position.Y))
end
end)
UserInputService.InputEnded:Connect(function(input)
if GuiService.MenuIsOpen then return end
if UserInputService:GetFocusedTextBox() then return end
if input.UserInputType == Enum.UserInputType.Keyboard then
if input.KeyCode == Enum.KeyCode.Left then
self.Inputs.KB.Left = false
end
if input.KeyCode == Enum.KeyCode.Right then
self.Inputs.KB.Right = false
end
end
if input.UserInputType == Enum.UserInputType.MouseButton2 then
self.Inputs.MS.RMB = false
end
if input.UserInputType == Enum.UserInputType.Touch then
if self.Inputs.TC.DJ == input then
self.Inputs.TC.DJ = nil
return
end
self.Inputs.TC.LP = nil
self.Inputs.TC.Touch[input] = false
end
if input.KeyCode == Enum.KeyCode.Thumbstick2 then
self.Inputs.GP.DJ = Vector2.zero
end
end)
UserInputService.PointerAction:Connect(function(wheel, pan, pinch, gpe)
if not gpe then
self:OnPanInput(pan * Vector2.new(1, 0.77) * math.rad(7), false)
self:OnZoomInput(-wheel - pinch)
end
end)
local function resetInputDevices()
self.Inputs:Reset()
end
UserInputService.WindowFocused:Connect(resetInputDevices)
UserInputService.WindowFocusReleased:Connect(resetInputDevices)
UserInputService.TextBoxFocusReleased:Connect(resetInputDevices)
GuiService.MenuOpened:Connect(resetInputDevices)
local states = {
[false] = "rbxasset://textures/ui/mouseLock_off@2x.png",
[true] = "rbxasset://textures/ui/mouseLock_on@2x.png"
}
local MobileShiftlock = Instance.new("ImageButton")
MobileShiftlock.Parent = SCREENGUI
MobileShiftlock.BackgroundTransparency = 1
MobileShiftlock.Position = UDim2.new(1, -190, 1, -60)
MobileShiftlock.Size = UDim2.new(0, 40, 0, 40)
MobileShiftlock.Image = states[false]
local state = false
AddToRenderStep(function()
local playerGui = Player:FindFirstChildOfClass("PlayerGui")
local touchGui = playerGui and playerGui:FindFirstChild("TouchGui")
if not touchGui or not touchGui.Enabled then
MobileShiftlock.Visible = false
return
end
local touchFrame = touchGui and touchGui:FindFirstChild("TouchControlFrame")
local jumpButton = touchFrame and touchFrame:FindFirstChild("JumpButton")
if not jumpButton then
MobileShiftlock.Visible = false
return
end
if state ~= Reanimate.Shiftlocked then
state = Reanimate.Shiftlocked
MobileShiftlock.Image = states[state]
end
MobileShiftlock.Visible = not not Reanimate.Character
local pos = jumpButton.AbsolutePosition - SCREENGUI.AbsolutePosition
local size = jumpButton.AbsoluteSize
local ratio = 4 / 7
pos += Vector2.new(-size.X * (ratio + 0.2), size.Y * (1 - ratio))
size *= ratio
MobileShiftlock.Position = UDim2.fromOffset(pos.X, pos.Y)
MobileShiftlock.Size = UDim2.fromOffset(size.X, size.Y)
end)
MobileShiftlock.Activated:Connect(function()
Reanimate.Shiftlocked = Reanimate.ShiftlockEnabled and not Reanimate.Shiftlocked
end)
RunService:BindToRenderStep("Uhhhhhh_Camera", Enum.RenderPriority.Camera.Value + 1, function(dt)
self.VRMode = VRService.VREnabled
if UserInputService:GetFocusedTextBox() then
resetInputDevices()
end
if self.Inputs.KB.Left then
self:OnPanInput(Vector2.new(math.rad(-120) * dt, 0), true)
end
if self.Inputs.KB.Right then
self:OnPanInput(Vector2.new(math.rad(120) * dt, 0), true)
end
self:OnPanInput(self.Inputs.GP.DJ * Vector2.new(1, 0.77) * math.rad(4) * 60 * dt * GameSettings.GamepadCameraSensitivity, true)
local input = self.Input * Vector3.new(1, GameSettings:GetCameraYInvertValue(), 1)
self.Input = Vector3.zero
local zoomDelta = input.Z
if math.abs(zoomDelta) > 0 then
if zoomDelta > 0 then
self.Zoom += zoomDelta * (1 + self.Zoom * 0.5)
else
self.Zoom = (self.Zoom + zoomDelta) / (1 - zoomDelta * 0.5)
end
end
self.Zoom = math.clamp(self.Zoom, 0.5, 100000)
local rzoom = self.Zoom
if self.FPSLocked then
self.Zoom = 0.5
rzoom = 0.5
end
if self.VRMode then
input *= Vector3.new(1, 0, 1)
rzoom *= Reanimate.CharacterScale
self._Zoom = rzoom
end
self._Zoom = rzoom + (self._Zoom - rzoom) * math.exp(-32 * dt)
local ltm = Reanimate.LocalTransparencyModifier
local tltm = 0
local sltm = dt * 3
if not self.Scriptable then
if self:IsFirstPerson() then
tltm = 1
elseif rzoom < 1.5 * Reanimate.CharacterScale then
tltm = 0.5
end
end
if math.abs(ltm - tltm) <= sltm then
ltm = tltm
elseif ltm < tltm then
ltm += sltm
else
ltm -= sltm
end
Reanimate.LocalTransparencyModifier = ltm
if not Reanimate.ShiftlockEnabled and Reanimate.Shiftlocked then
Reanimate.Shiftlocked = false
end
if Reanimate.Character then
local targetMouseBehavior = Enum.MouseBehavior.Default
if self:IsMousePanning() then
if self:IsMouseLocked() then
if UserInputService.TouchEnabled then
targetMouseBehavior = Enum.MouseBehavior.LockCurrentPosition
else
targetMouseBehavior = Enum.MouseBehavior.LockCenter
end
else
targetMouseBehavior = Enum.MouseBehavior.LockCurrentPosition
end
end
if UserInputService.MouseBehavior ~= targetMouseBehavior then
UserInputService.MouseBehavior = targetMouseBehavior
end
local targetMouseIcon = ""
if Reanimate.Shiftlocked then
targetMouseIcon = "rbxasset://textures/Cursors/CrossMouseIcon.png"
end
if UserInputService.MouseIcon ~= targetMouseIcon then
UserInputService.MouseIcon = targetMouseIcon
end
if GameSettings.RotationType ~= Enum.RotationType.MovementRelative then
GameSettings.RotationType = Enum.RotationType.MovementRelative
end
local Humanoid = Reanimate.Character:FindFirstChildOfClass("Humanoid")
local RootPart = Reanimate.Character:FindFirstChild("HumanoidRootPart")
if Humanoid and RootPart and Camera.CameraSubject == Humanoid then
if self.Scriptable then
Camera.FieldOfView = self.FieldOfView
Camera.FieldOfViewMode = "Vertical"
else
Camera.FieldOfView = 70
Camera.FieldOfViewMode = "Vertical"
local newCameraCFrame, newCameraFocus = self.CFrame, self.Focus
local subjectPosition = RootPart.Position + RootPart.CFrame.UpVector * 1.5
if not self.VRMode then subjectPosition += RootPart.CFrame.Rotation * Humanoid.CameraOffset end
local currLookVector = suppliedLookVector or newCameraCFrame.LookVector
local currPitchAngle = math.asin(currLookVector.Y)
local constrainedRotateInput = Vector2.new(input.X, math.clamp(input.Y, math.rad(-80) + currPitchAngle, math.rad(80) + currPitchAngle))
local startCFrame = CFrame.lookAt(Vector3.zero, currLookVector)
local newLookCFrame = CFrame.Angles(0, -constrainedRotateInput.X, 0) * startCFrame * CFrame.Angles(-constrainedRotateInput.Y, 0, 0)
local newLookVector = newLookCFrame.LookVector
if self.VRMode then
newLookVector = (newLookVector * Vector3.new(1, 0, 1)).Unit
if newLookVector.Magnitude == 0 or newLookVector ~= newLookVector then
newLookVector = Vector3.zAxis
end
end
if self:IsMouseLocked() and not self:IsFirstPerson() then
local cameraRelativeOffset = newLookCFrame * Vector3.new(1.7, 0, 0)
if cameraRelativeOffset == cameraRelativeOffset then
subjectPosition += cameraRelativeOffset
end
end
newCameraFocus = CFrame.new(subjectPosition)
local cameraFocusP = newCameraFocus.Position
if self.VRMode then
cameraFocusP += newLookVector * 0.5
end
newCameraCFrame = CFrame.lookAt(cameraFocusP - newLookVector * self._Zoom, cameraFocusP)
self.CFrame, self.Focus = newCameraCFrame, newCameraFocus
end
Camera.CFrame, Camera.Focus = self.CFrame, self.Focus
end
for _,v in Reanimate.CharacterLTMs do
v.LocalTransparencyModifier = ltm
end
end
pcall(function() CoreGui.TopBarApp.TopBarApp.FullScreenFrame.HurtOverlay.Visible = false end)
end)
end
end
Reanimate.CameraLockCharacter = function()
local RCRootPart = Reanimate.Character and Reanimate.Character:FindFirstChild("HumanoidRootPart")
if RCRootPart and RCRootPart:IsA("BasePart") then
local ccf = Reanimate.Camera:GetMovementCFrame()
local rcf = RCRootPart.CFrame
local ax, ay, az = ccf:ToEulerAngles(Enum.RotationOrder.YXZ)
local bx, by, bz = rcf:ToEulerAngles(Enum.RotationOrder.YXZ)
RCRootPart.CFrame = CFrame.fromEulerAngles(bx, ay, bz, Enum.RotationOrder.YXZ) + rcf.Position
end
end
Reanimate.CreateCharacter = function(InitCFrame)
local RC = Reanimate.Character
local cf = CFrame.new(Camera.Focus.Position)
if RC then
local r = RC:FindFirstChild("HumanoidRootPart")
if r then
cf = r.CFrame
end
RC:Destroy()
elseif RealChar() then
local r = RealChar():FindFirstChild("HumanoidRootPart")
if r then
cf = r.CFrame
end
end
if InitCFrame then
cf = InitCFrame
end
Reanimate.Camera.CFrame, Reanimate.Camera.Focus = Camera.CFrame, Camera.Focus
Reanimate.Camera:OnReset()
RC = CreateHumanoidCharacter()
RC.ModelStreamingMode = "Persistent"
Player.ReplicationFocus = workspace
local ltmparts = Reanimate.CharacterLTMs
table.clear(ltmparts)
local function OnDescendant(v)
local exist = pcall(function()
return v.LocalTransparencyModifier
end)
if exist then
table.insert(ltmparts, v)
local conn = nil
conn = v.AncestryChanged:Connect(function()
if not v:IsDescendantOf(RC) then
local i = table.find(ltmparts, v)
if i then
table.remove(ltmparts, i)
end
conn:Disconnect()
end
end)
end
end
RC.DescendantAdded:Connect(OnDescendant)
for _,v in RC:GetDescendants() do
task.spawn(OnDescendant, v)
end
RC:ScaleTo(Reanimate.CharacterScale)
local RCHumanoid, RCRootPart = RC.Humanoid, RC.HumanoidRootPart
local RCHead, RCTorso, RCRootJoint, RCNeck = RC.Head, RC.Torso, RCRootPart.RootJoint, RC.Torso.Neck
local BodyForce = Instance.new("BodyForce")
BodyForce.Parent = RCRootPart
BodyForce.Force = Vector3.zero
RC.Parent = workspace
RCRootPart.RootPriority = 67
RCRootPart.CFrame = cf
local SafeY = cf.Y
local IsFloat = false
local SeatWeld = nil
local LastJumpOffSeat = 0
RCHumanoid.Touched:Connect(function(part, limb)
if Reanimate.SeatSit and part:IsA("Seat") and not RCHumanoid.Sit and os.clock() - LastJumpOffSeat > 2 then
RCHumanoid.Sit = true
if SeatWeld ~= nil then
SeatWeld = SeatWeld:Destroy()
end
SeatWeld = Instance.new("Weld")
SeatWeld.Name = "hell yeah!! :3"
SeatWeld.Parent = RCRootPart
SeatWeld.Part0 = part
SeatWeld.Part1 = RCRootPart
SeatWeld.C0 = CFrame.new(0, part.Size.Y / 2, 0)
SeatWeld.C1 = CFrame.new(0, -1.5 * RC:GetScale(), 0)
Util.LinkDestroyI2C(SeatWeld, RCHumanoid:GetPropertyChangedSignal("Jump"):Connect(function()
if RCHumanoid.Jump then
RCHumanoid.Sit = false
SeatWeld:Destroy()
end
end))
end
if part.Name == "Handle" and part.Parent:IsA("Tool") and not part.Parent.Parent:FindFirstChildOfClass("Humanoid") then
if Reanimate.ToolGrab then
if RealChar() then
local Humanoid = RealChar():FindFirstChildOfClass("Humanoid")
if Humanoid then
Humanoid:EquipTool(part.Parent)
end
end
end
end
end)
RCHumanoid.Seated:Connect(function(active)
if not active then
if SeatWeld ~= nil then
SeatWeld = SeatWeld:Destroy()
end
LastJumpOffSeat = os.clock()
end
end)
local LastJump = false
local RCP = RaycastParams.new()
RCP.RespectCanCollide = true
RCP.FilterType = Enum.RaycastFilterType.Exclude
RCP.FilterDescendantsInstances = {RC}
local noclipStates = {"Running", "Jumping", "Freefall", "Landed", "Climbing", "Swimming"}
local fallingStates = {"Jumping", "Freefall", "PlatformStanding", "Physics", "Ragdoll", "GettingUp", "Seated", "Flying", "FallingDown"}
local LastSafest = RCRootPart.CFrame
local CMove, CJump = Vector3.zero, false
Util.LinkDestroyI2C(RC, RunService.PreAnimation:Connect(function(dt)
CMove, CJump = Reanimate.Control.Move, Reanimate.Control.Jump
local CamCF = Reanimate.Camera:GetMovementCFrame()
local _,x,_ = CamCF:ToEulerAngles(Enum.RotationOrder.YXZ)
local MoveCF = CFrame.Angles(0, x, 0)
pcall(sethiddenproperty, RCRootPart, "PhysicsRepRootPart", nil)
local scale = Reanimate.CharacterScale
if scale ~= RC:GetScale() then
RC:ScaleTo(scale)
end
local force = Vector3.zero
local RCHumanoidState = RCHumanoid:GetState().Name
if RCHumanoidState == "Swimming" then
force += Vector3.new(0, workspace.Gravity * 0.5, 0) * RCRootPart.AssemblyMass
end
local gravaff = not not table.find(fallingStates, RCHumanoidState)
if gravaff then
if Reanimate.ScaleGravity and not RCRootPart:IsGrounded() then
force += Vector3.new(0, -workspace.Gravity * (scale - 1), 0) * RCRootPart.AssemblyMass
end
end
if LastJump ~= CJump then
if CJump then
if Reanimate.InfiniteJump and RCHumanoid:GetState() == Enum.HumanoidStateType.Freefall and RCHumanoid.JumpPower > 0 then
RCRootPart.Velocity = Vector3.new(
RCRootPart.Velocity.X, RCHumanoid.JumpPower, RCRootPart.Velocity.Z
)
end
end
end
LastJump = CJump
local TargetCameraPosition = RCRootPart.CFrame * Vector3.new(0, 1.5 * scale, 0)
if RCRootJoint.Active then
TargetCameraPosition = RCTorso.CFrame * Vector3.new(0, 1.5 * scale, 0)
if RCNeck.Active then
TargetCameraPosition = RCHead.Position
end
end
local TargetCameraOffset = (RCRootPart.CFrame * CFrame.new(0, 1.5, 0)):PointToObjectSpace(TargetCameraPosition)
if not Reanimate.SmoothCam then
TargetCameraOffset = Vector3.new(0, -1.5, 0) + Vector3.new(0, 1.5, 0) * scale
end
RCHumanoid.CameraOffset = TargetCameraOffset:Lerp(RCHumanoid.CameraOffset, math.exp(-9.8 * dt))
if RCHumanoidState == "Swimming" then
RCHumanoid:Move(CamCF:VectorToWorldSpace(CMove))
else
RCHumanoid:Move(MoveCF:VectorToWorldSpace(CMove))
end
RCHumanoid.Jump = CJump
BodyForce.Force = force
if RCRootPart.Position.Y < FallenPartsDestroyHeight + 3 * Reanimate.CharacterScale then
RCRootPart.CFrame = LastSafest
RCRootPart.Velocity = Vector3.new(0, 50, 0)
RCRootPart.RotVelocity = Vector3.zero
end
end))
Util.LinkDestroyI2C(RC, RunService.PreSimulation:Connect(function(dt)
local RCHumanoidState = RCHumanoid:GetState().Name
local clip = not table.find(noclipStates, RCHumanoidState)
for _,v in RC:GetChildren() do
if v:IsA("BasePart") then
v.CanCollide = clip or (not Reanimate.Noclip and v == RCRootPart)
end
end
end))
Util.LinkDestroyI2C(RC, RunService.PostSimulation:Connect(function(dt)
RCHumanoid.Jump = CJump
local tcf, pos = RCRootPart.CFrame.Rotation, RCRootPart.CFrame.Position
local RCHumanoidState = RCHumanoid:GetState().Name
local safe = true
local void = true
for i=1, 8 do
local off = CFrame.Angles(0, (i / 4) * math.pi, 0):VectorToWorldSpace(Vector3.new(0, 0, -0.5))
local r = workspace:Raycast(RCRootPart.Position + off, Vector3.new(0, -65536, 0), RCP)
if r then
void = false
if r.Distance > 3 * Reanimate.CharacterScale + 8 + RCHumanoid.HipHeight then
safe = false
end
else
safe = false
end
end
if safe then
LastSafest = RCRootPart.CFrame
end
if RCHumanoidState == "Climbing" or not void then
SafeY = pos.Y
IsFloat = false
else
IsFloat = true
end
if Reanimate.PatchmaVoidFloat and IsFloat then
pos = Vector3.new(pos.X, SafeY, pos.Z)
RCRootPart.Velocity *= Vector3.new(1, 0, 1)
end
RCRootPart.CFrame = tcf + pos
if Reanimate:ShouldRotationType() then
Reanimate:CameraLockCharacter()
end
end))
Reanimate.Character = RC
_G_Uhhhhhh.Character = RC
end
Reanimate.DestroyCharacter = function()
if Reanimate.Character then
Reanimate.Character = Reanimate.Character:Destroy()
_G_Uhhhhhh.Character = nil
end
end
do
local AntiflingHumanoids = {}
local AntiflingBaseParts = {}
local OnStepped = function()
for i,v in AntiflingBaseParts do
if v:IsDescendantOf(workspace) then
if v.CanCollide then v.CanCollide = false end
v.AssemblyLinearVelocity, v.AssemblyAngularVelocity = Vector3.zero, Vector3.zero
else
table.remove(AntiflingBaseParts, i)
end
end
for i,v in AntiflingHumanoids do
if v:IsDescendantOf(workspace) then
if v.EvaluateStateMachine then v.EvaluateStateMachine = false end
else
table.remove(AntiflingHumanoids, i)
end
end
end
RunService.PreAnimation:Connect(OnStepped)
RunService.PreSimulation:Connect(OnStepped)
RunService.Stepped:Connect(OnStepped)
local OnBasePart = function(v)
if v:IsA("BasePart") then
v.CanCollide = false
if not table.find(AntiflingBaseParts, v) then
table.insert(AntiflingBaseParts, v)
end
end
if v:IsA("Humanoid") then
v.EvaluateStateMachine = false
if not table.find(AntiflingHumanoids, v) then
table.insert(AntiflingHumanoids, v)
end
end
end
local OnCharacter = function(character)
character.DescendantAdded:Connect(OnBasePart)
for _,v in character:GetDescendants() do
OnBasePart(v)
end
end
local OnPlayer = function(player)
if player == Player then return end
player.CharacterAdded:Connect(OnCharacter)
if player.Character then OnCharacter(player.Character) end
end
Players.PlayerAdded:Connect(OnPlayer)
for _,player in Players:GetPlayers() do
OnPlayer(player)
end
end
local HumanoidLASetHookState
if ismissing(hookmetamethod) or ismissing(hookfunction) then
HumanoidLASetHookState = function(hooked) end
else
local LoadAnimation_old = nil
local function IsRealAnimTarget(inst)
local rc, pc = Reanimate.Character, RealChar()
local p, depth, top = inst, 0, inst
while p and depth < 40 do
if p == rc then return false end
if p == pc then return true end
if p.Parent == nil then top = p end
if p.ClassName == "Model" and p.Name == Player.Name then return true end
p = p.Parent
depth += 1
end
return top ~= game
end
local function MakeProxy(animation)
local acopy = Instance.new("Animation")
acopy.AnimationId = animation.AnimationId
animation = acopy
local real, pending = nil, {}
local function bind()
local t0 = os.clock()
while not real and os.clock() - t0 < 20 do
local rc = Reanimate.Character
local rhum = rc and rc:FindFirstChildOfClass("Humanoid")
if rhum then
real = LoadAnimation_old(rhum, animation)
for k, v in pending do
pcall(function() real[k] = v end)
end
else
task.wait()
end
end
return real
end
return setmetatable({}, {
__index = function(_, k)
local t = bind()
if not t then return nil end
local v = t[k]
if type(v) == "function" then
return function(_, ...) return v(t, ...) end
end
return v
end,
__newindex = function(_, k, v)
pending[k] = v
if real then pcall(function() real[k] = v end) end
end,
})
end
local function LoadAnimation_new(self, animation)
if IsRealAnimTarget(self) then
local rc = Reanimate.Character
local rhum = rc and rc:FindFirstChildOfClass("Humanoid")
if rhum then
local acopy = Instance.new("Animation")
acopy.AnimationId = animation.AnimationId
return LoadAnimation_old(rhum, acopy)
end
return MakeProxy(animation)
end
local char = Instance.new("Model")
char.Parent = workspace
local hum = Instance.new("Humanoid")
hum.Parent = char
local anim = LoadAnimation_old(hum, animation)
hum.Parent = nil
char:Destroy()
return anim
end
local LoadAnimation_nc = nil
local _HumanoidDummy = Instance.new("Humanoid")
local _HumanoidLA = _HumanoidDummy.LoadAnimation
local AnimatorLA_old = nil
local _AnimatorLA = Instance.new("Animator").LoadAnimation
local newloadanimation = newcclosure(function(self, animation)
if typeof(self) == "Instance" and (self:IsA("Humanoid") or self:IsA("Animator")) and typeof(animation) == "Instance" and animation:IsA("Animation") and (not checkcaller() or IsRealAnimTarget(self)) then
return LoadAnimation_new(self, animation)
end
return LoadAnimation_old(self, animation)
end)
local newanimatorla = newcclosure(function(self, animation)
if typeof(self) == "Instance" and self:IsA("Animator") and typeof(animation) == "Instance" and animation:IsA("Animation") and (not checkcaller() or IsRealAnimTarget(self)) then
return LoadAnimation_new(self, animation)
end
return AnimatorLA_old(self, animation)
end)
local newnamecall = newcclosure(function(...)
local method = getnamecallmethod()
if method and (method == "LoadAnimation" or method == "loadAnimation") then
local self, animation = ...
if typeof(self) == "Instance" and (self:IsA("Humanoid") or self:IsA("Animator")) and typeof(animation) == "Instance" and animation:IsA("Animation") and (not checkcaller() or IsRealAnimTarget(self)) then
return LoadAnimation_new(self, animation)
end
end
if setnamecallmethod and method then setnamecallmethod(method) end
return LoadAnimation_nc(...)
end)
HumanoidLASetHookState = function(hooked)
if hooked then
if not LoadAnimation_old then
LoadAnimation_old = hookfunction(_HumanoidLA, clonefunction(newloadanimation))
end
if not LoadAnimation_nc then
LoadAnimation_nc = hookmetamethod(_HumanoidDummy, "__namecall", clonefunction(newnamecall))
end
if not AnimatorLA_old then
local ok, old = pcall(hookfunction, _AnimatorLA, clonefunction(newanimatorla))
if ok then AnimatorLA_old = old end
end
else
if LoadAnimation_old then
hookfunction(_HumanoidLA, LoadAnimation_old)
LoadAnimation_old = nil
end
if LoadAnimation_nc then
hookmetamethod(_HumanoidDummy, "__namecall", LoadAnimation_nc)
LoadAnimation_nc = nil
end
if AnimatorLA_old then
pcall(hookfunction, _AnimatorLA, AnimatorLA_old)
AnimatorLA_old = nil
end
end
end
end
Util.SetMotor6DTransform = function(motor, transform)
local name = motor.Name
motor.MaxVelocity = 9e9
local _, _, angle = transform:ToEulerAngles(Enum.RotationOrder.ZYX)
motor.DesiredAngle = angle
motor:SetDesiredAngle(angle)
local axis, angle = transform:ToAxisAngle()
local newangle = axis * angle
pcall(sethiddenproperty, motor, "ReplicateCurrentOffset6D", transform.Position)
pcall(sethiddenproperty, motor, "ReplicateCurrentAngle6D", newangle)
end
Util.SetMotor6DOffset = function(motor, offset)
Util.SetMotor6DTransform(motor, motor.C0:Inverse() * offset * motor.C1)
end
Util.ShowPartHitbox = function(part)
local w = Instance.new("WireframeHandleAdornment")
w.Name = "TempWireframe"
w.Adornee = part
w.Color3 = Color3.new(0, 1, 0)
w.Transparency = 0
w.ZIndex = 10
w.AlwaysOnTop = true
w.Thickness = 1
w.Parent = SCREENGUI
local hs = part.Size / 2
local verts = {
Vector3.new(-hs.X, -hs.Y, -hs.Z),
Vector3.new( hs.X, -hs.Y, -hs.Z),
Vector3.new( hs.X, hs.Y, -hs.Z),
Vector3.new(-hs.X, hs.Y, -hs.Z),
Vector3.new(-hs.X, -hs.Y, hs.Z),
Vector3.new( hs.X, -hs.Y, hs.Z),
Vector3.new( hs.X, hs.Y, hs.Z),
Vector3.new(-hs.X, hs.Y, hs.Z),
}
w:AddLine(verts[1], verts[2])
w:AddLine(verts[2], verts[3])
w:AddLine(verts[3], verts[4])
w:AddLine(verts[4], verts[1])
w:AddLine(verts[5], verts[6])
w:AddLine(verts[6], verts[7])
w:AddLine(verts[7], verts[8])
w:AddLine(verts[8], verts[5])
w:AddLine(verts[1], verts[5])
w:AddLine(verts[2], verts[6])
w:AddLine(verts[3], verts[7])
w:AddLine(verts[4], verts[8])
Debris:AddItem(w, 1)
end
local RIGHTGRIP_C0 = CFrame.new(0, -1, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0)
Util.PredictionFling = function(target)
if typeof(target) == "Instance" then
if target:IsA("Model") then
target = target:FindFirstChild("HumanoidRootPart") or target.PrimaryPart or target:FindFirstChildWhichIsA("BasePart")
end
if target and target:IsA("BasePart") then
if not target:IsDescendantOf(workspace) then
return CFrame.identity, true
end
local t = os.clock()
local t2 = math.sin(t * 15) + 1
local cf = target.CFrame * CFrame.Angles(1.57, 0, 0)
if not Reanimate.UsePhysicsRepRootPart then
cf += target.AssemblyLinearVelocity * t2 + Vector3.new(0, -workspace.Gravity * 0.5 * t2 * t2 + math.sin(t * 60), 0)
if cf.Position.Y < target.Position.Y - 1 then
cf = cf.Rotation + Vector3.new(cf.Position.X, target.Position.Y - 1, cf.Position.Z)
end
end
local oldpos = target:GetAttribute("_Uhhhhhh_LastPosition")
if not oldpos then
oldpos = target.Position
target:SetAttribute("_Uhhhhhh_LastPosition", oldpos)
end
if (target.Position - oldpos).Magnitude > 200 then
target:SetAttribute("_Uhhhhhh_LastPosition", nil)
return cf, true
end
return cf, false
end
end
if typeof(target) == "CFrame" then
return target, false
end
if typeof(target) == "Vector3" then
return CFrame.new(target), false
end
return CFrame.identity, true
end
Util.PredictionFlingPart = function(target)
if typeof(target) == "Instance" then
if target:IsA("Model") then
target = target:FindFirstChild("HumanoidRootPart") or target.PrimaryPart or target:FindFirstChildWhichIsA("BasePart")
end
if target and target:IsA("BasePart") then
return target
end
end
end
SaveData.Reanimator = SaveData.Reanimator or {}
local LimbReanimator = {}
LimbReanimator.Name = "Limbs"
SaveData.Reanimator.LimbMode = SaveData.Reanimator.LimbMode or 0
SaveData.Reanimator.LimbVelocity = SaveData.Reanimator.LimbVelocity or 0
SaveData.Reanimator.LimbInitMode = SaveData.Reanimator.LimbInitMode or 2
SaveData.Reanimator.LimbReplicateFPS10 = not not SaveData.Reanimator.LimbReplicateFPS10
SaveData.Reanimator.LimbRoleplay = not not SaveData.Reanimator.LimbRoleplay
SaveData.Reanimator.LimbUseNaNFling = not not SaveData.Reanimator.LimbUseNaNFling
LimbReanimator.Mode = SaveData.Reanimator.LimbMode
LimbReanimator.Velocity = SaveData.Reanimator.LimbVelocity
LimbReanimator.InitMode = SaveData.Reanimator.LimbInitMode
LimbReanimator.ReplicateFPS10 = SaveData.Reanimator.LimbReplicateFPS10
LimbReanimator.FlingEnabled = not SaveData.Reanimator.LimbRoleplay
LimbReanimator.UseNaNFling = SaveData.Reanimator.LimbUseNaNFling
LimbReanimator.FlingTargets = {}
LimbReanimator._TempNotFling = {}
function LimbReanimator.ShowHitboxes()
Util.UINotify("Just a useless option")
pcall(function()
Util.ShowPartHitbox(RealChar().HumanoidRootPart)
end)
end
function LimbReanimator.Fling(target, duration)
if not LimbReanimator.FlingEnabled then return end
if not target then return false end
for _,v in LimbReanimator.FlingTargets do
if v.Target == target then
return false
end
end
if target == Reanimate.Character then return false end
if target == RealChar() then return false end
if typeof(target) == "Instance" then
if LimbReanimator._TempNotFling[target] then return end
LimbReanimator._TempNotFling[target] = true
task.delay(1, function()
LimbReanimator._TempNotFling[target] = nil
end)
end
table.insert(LimbReanimator.FlingTargets, {
Target = target,
Duration = duration
})
if typeof(target) == "Instance" then
if target:IsA("Model") then
local h = Util.Instance("Highlight")
h.Adornee = target
h.FillColor = Color3.new(1, 0, 0)
h.OutlineColor = Color3.new(1, 0, 0)
h.FillTransparency = 0.5
h.OutlineTransparency = 0
h.Parent = target
TweenService:Create(h, TweenInfo.new(5), {
FillTransparency = 1,
OutlineTransparency = 1
}):Play()
game.Debris:AddItem(h, 5)
end
end
return true
end
function LimbReanimator.SetRootPartMode(mode)
assert(typeof(mode) == "number")
LimbReanimator.Mode = mode
end
function LimbReanimator.Config(parent)
UI.CreateText(parent, "as mentioned in the README, this only works for SOME games,\nbecause 'modern' games create the Animator automatically which breaks limb reanimation", 10, Enum.TextXAlignment.Center)
local dmode = UI.CreateDropdown(parent, "RootPart Mode", {"RootPart in very void", "RootPart in void", "Keep RootPart Streamed", "CurrentAngle Style", "RootPart is Torso"}, LimbReanimator.Mode + 1)
local dvel = UI.CreateDropdown(parent, "RootPart Velocity", {"No Velocity", "Follow Character", "Fling-like"}, LimbReanimator.Velocity + 1)
local dinit = UI.CreateDropdown(parent, "Init Mode", {"Reset Character", "CDSB + Reset", "CDSB + SSE + Kill"}, LimbReanimator.InitMode + 1)
dmode.Changed:Connect(function(val)
LimbReanimator.Mode = val - 1
SaveData.Reanimator.LimbMode = val - 1
end)
dvel.Changed:Connect(function(val)
LimbReanimator.Velocity = val - 1
SaveData.Reanimator.LimbVelocity = val - 1
end)
dinit.Changed:Connect(function(val)
LimbReanimator.InitMode = val - 1
SaveData.Reanimator.LimbInitMode = val - 1
end)
UI.CreateSwitch(parent, "Show me how I look!", LimbReanimator.ReplicateFPS10).Changed:Connect(function(val)
LimbReanimator.ReplicateFPS10 = val
SaveData.Reanimator.LimbReplicateFPS10 = val
end)
UI.CreateSwitch(parent, "Target Fling Enabled", LimbReanimator.FlingEnabled).Changed:Connect(function(val)
LimbReanimator.FlingEnabled = val
SaveData.Reanimator.LimbRoleplay = not val
end)
UI.CreateText(parent, "vvv touch player = they lose ownership vvv", 10, Enum.TextXAlignment.Center)
UI.CreateSwitch(parent, "Use NaN State Fling", LimbReanimator.UseNaNFling).Changed:Connect(function(val)
LimbReanimator.UseNaNFling = val
SaveData.Reanimator.LimbUseNaNFling = val
end)
Util.LinkDestroyI2C(dmode, RunService.Heartbeat:Connect(function()
dmode.Value = LimbReanimator.Mode + 1
dvel.Value = LimbReanimator.Velocity + 1
dinit.Value = LimbReanimator.InitMode + 1
end))
end
function LimbReanimator.Start()
local LimbNames = {"Head", "Torso", "Left Arm", "Right Arm", "Left Leg", "Right Leg"}
local rootposition = Vector3.new(
math.random(-65536, 65536),
math.random(-70000, -60000),
math.random(-65536, 65536)
)
local rootposition2 = Vector3.new(
math.random(-2048, 2048),
math.random(-500, -100) + FallenPartsDestroyHeight,
math.random(-2048, 2048)
)
local InitCFrame = nil
if RealChar() then
local h = RealChar():FindFirstChildOfClass("Humanoid")
if h and h.RootPart then
local r = h.RootPart
InitCFrame = r.CFrame
if h:GetState() ~= Enum.HumanoidStateType.Dead then
h:SetStateEnabled(Enum.HumanoidStateType.Dead, true)
h:ChangeState(Enum.HumanoidStateType.Dead)
end
end
end
local LimbMapping = loadstring(readfile("UhhhhhhReanim/BuiltinModules/d_limbmap.lua"))()
local FakeTools = {}
local function CreateFakeTool()
local FakeTool = Instance.new("Tool")
FakeTool.Name = "faketool"
local FakeToolHandle = Instance.new("Part")
FakeToolHandle.Name = "Handle"
FakeToolHandle.Transparency = 1
FakeToolHandle.Color = Color3.new(0, 0, 1)
FakeToolHandle.CanCollide = false
FakeToolHandle.Massless = true
FakeToolHandle.Parent = FakeTool
FakeTool.Parent = Reanimate.Character
local RightGrip = Instance.new("Weld")
RightGrip.Name = "RightGrip"
RightGrip.Parent = FakeToolHandle
RightGrip.Part0 = Reanimate.Character and Reanimate.Character:FindFirstChild("Right Arm")
RightGrip.Part1 = FakeToolHandle
RightGrip.C0 = RIGHTGRIP_C0
Util.LinkDestroyI2C(FakeTool, FakeTool:GetPropertyChangedSignal("Grip"):Connect(function()
RightGrip.C1 = FakeTool.Grip
end))
RightGrip.C1 = FakeTool.Grip
return FakeTool
end
local BaseParts = {}
local UnknownMotor6Ds = {}
local CharOnDesc = function(v)
if v:IsA("BasePart") then
if not table.find(BaseParts, v) then
table.insert(BaseParts, v)
v.CanCollide = false
v:GetPropertyChangedSignal("CanCollide"):Connect(function()
if v.CanCollide then v.CanCollide = false end
end)
end
elseif v:IsA("Motor6D") then
repeat task.wait() until (not v:IsDescendantOf(workspace)) or (v.Part0 and v.Part1)
if not v:IsDescendantOf(workspace) then return end
local p0, p1 = v.Part0, v.Part1
if p0 and p1 then
p0, p1 = p0.Name, p1.Name
for _,map in LimbMapping do
if map.Part0 == p0 and map.Part1 == p1 then
map.Reference = v
return
end
end
end
table.insert(UnknownMotor6Ds, v)
elseif v:IsA("Animator") then
task.defer(v.Destroy, v)
elseif v:IsA("LocalScript") and v.Parent == RealChar() then
v.Enabled = false
v:GetPropertyChangedSignal("Enabled"):Connect(function()
if v.Enabled then v.Enabled = false end
end)
v:GetPropertyChangedSignal("Disabled"):Connect(function()
if not v.Disabled then v.Disabled = true end
end)
elseif v:IsA("Tool") and v.Parent == RealChar() then
if not FakeTools[v] then
FakeTools[v] = true
local fake = CreateFakeTool()
fake.Grip = v.Grip
local h = v:FindFirstChild("Handle")
if h ~= nil then
fake.Handle.Size = h.Size
end
Util.LinkDestroyI2C(fake, RunService.PreSimulation:Connect(function()
if v.Parent == RealChar() then
fake.Grip = v.Grip
local h = v:FindFirstChild("Handle")
if h ~= nil then
fake.Handle.Size = h.Size
end
else
fake:Destroy()
FakeTools[v] = nil
end
end))
Util.LinkDestroyI2C(fake, v.ChildAdded:Connect(function(v)
if v.ClassName == "StringValue" and v.Name == "toolanim" then
local w = Instance.new("StringValue")
w.Name = "toolanim"
w.Value = v.Value
w.Parent = fake
Debris:AddItem(v, 1)
Debris:AddItem(w, 1)
end
end))
fake.Handle.Touched:Connect(function(t)
local h = v:FindFirstChild("Handle")
if h and t and h:IsDescendantOf(workspace) and t:IsDescendantOf(workspace) then
h.CanTouch = true
pcall(firetouchinterest, h, t, 0)
end
end)
fake.Handle.TouchEnded:Connect(function(t)
local h = v:FindFirstChild("Handle")
if h and t and h:IsDescendantOf(workspace) and t:IsDescendantOf(workspace) then
h.CanTouch = true
pcall(firetouchinterest, h, t, 1)
end
end)
end
end
end
local lastspawn = 0
local CharConn = RealEvent("CharacterAdded"):Connect(function(character)
local camcfr = Camera.CFrame
RunService.PreRender:Once(function()
RunService.PreAnimation:Wait()
Camera.CFrame = camcfr
end)
lastspawn = os.clock()
table.clear(BaseParts)
table.clear(UnknownMotor6Ds)
for _,map in LimbMapping do
map.Reference = nil
end
character.DescendantAdded:Connect(CharOnDesc)
for _,v in character:GetDescendants() do
task.spawn(CharOnDesc, v)
end
local humanoid = character:WaitForChild("Humanoid", 5)
local stupid = humanoid:FindFirstChildWhichIsA("Animator")
if stupid then
stupid:Destroy()
end
if not Reanimate.UseLoadAnimationHook then
stupid = character:FindFirstChild("Animate")
while not stupid do
character.ChildAdded:Wait()
stupid = character:FindFirstChild("Animate")
end
stupid:Destroy()
end
end)
RealEvent("CharacterAdded"):Wait()
Reanimate.CreateCharacter(InitCFrame)
local lastrep = 0
local function UpdateTransforms(ReanimCharacter, RootPart, rootcf, rootvel, flingtarget, flingcf)
if not RootPart:IsGrounded() then
if flingtarget then
if LimbReanimator.UseNaNFling then
RootPart.CFrame = CFrame.new(flingcf.Position + Vector3.new(0, 0, math.random(0, 1) * 0.005)) * CFrame.Angles(0, os.clock() * 15, 0)
RootPart.Velocity, RootPart.RotVelocity = Vector3.zero, Vector3.zero
else
RootPart.CFrame = flingcf + Vector3.new(0, 0, math.random(0, 1) * 0.005)
RootPart.Velocity, RootPart.RotVelocity = Vector3.new(0, -16384, 0), Vector3.one * 16384
end
pcall(sethiddenproperty, RootPart, "PhysicsRepRootPart", Reanimate.UsePhysicsRepRootPart and Util.PredictionFlingPart(flingtarget.Target) or nil)
else
RootPart.CFrame = rootcf + Vector3.new(0, 0, math.random(0, 1) * 0.005)
RootPart.Velocity, RootPart.RotVelocity = rootvel, Vector3.zero
pcall(sethiddenproperty, RootPart, "PhysicsRepRootPart", nil)
end
end
local dorep = true
if LimbReanimator.ReplicateFPS10 then
dorep = false
local b = os.clock()
local a = b - lastrep
if a >= 1 / 10 then
dorep = true
a %= 1 / 10
lastrep = b - a
end
end
for _,v in UnknownMotor6Ds do
Util.SetMotor6DTransform(v, CFrame.identity)
end
for _,map in LimbMapping do
local v = map.Reference
if v then
if flingtarget then
Util.SetMotor6DTransform(v, CFrame.identity)
else
local cf = CFrame.identity
local p0, p1 = ReanimCharacter:FindFirstChild(map.RPart0), ReanimCharacter:FindFirstChild(map.RPart1)
if map.RPart0 == "ROOT" then
p0 = RootPart
end
if p0 and p1 then
if map.Type == 1 then
cf = p0.CFrame:ToObjectSpace(p1.CFrame)
end
if map.Type == 2 then
local offset = map.Offset or CFrame.identity
local c0, c1 = CFrame.new(map.C0), CFrame.new(map.C1)
local transform = offset * (p0.CFrame * c0):ToObjectSpace(p1.CFrame * c1) * offset:Inverse()
cf = v.C0 * transform * v.C1:Inverse()
end
end
if dorep or not map.CFrame then
map.CFrame = cf
end
Util.SetMotor6DOffset(v, map.CFrame)
end
end
end
end
Reanimate.Starting = false
while not Reanimate.Stopping do
RunService.PreSimulation:Wait()
workspace.FallenPartsDestroyHeight = 0/0
local ReanimOkay = false
local Character, Humanoid, RootPart = RealChar(), nil, nil
if Character then
Humanoid = Character:FindFirstChildOfClass("Humanoid")
if Humanoid then
Humanoid.AutoRotate = false
if Humanoid.WalkSpeed < 1 then
Humanoid.WalkSpeed = 16
end
if Humanoid.JumpPower < 1 then
Humanoid.JumpPower = 50
end
RootPart = Humanoid.RootPart
if RootPart and Humanoid:GetState() ~= Enum.HumanoidStateType.Dead then
Humanoid:ChangeState(Enum.HumanoidStateType.Physics)
ReanimOkay = LimbReanimator.FlingTargets[1] == nil
end
end
end
local rootcf = CFrame.new(rootposition)
local rootvel = Vector3.zero
local ltm = Reanimate.LocalTransparencyModifier
local ReanimCharacter = Reanimate.Character
if ReanimCharacter then
local RCHumanoid = ReanimCharacter:FindFirstChildOfClass("Humanoid")
local RCRootPart = ReanimCharacter:FindFirstChild("HumanoidRootPart")
local RCTorso = ReanimCharacter:FindFirstChild("Torso")
if Camera then
Camera.CameraSubject = RCHumanoid
end
for _,v in BaseParts do
v.CanCollide = false
v.Velocity = Vector3.zero
v.RotVelocity = Vector3.zero
if not v:FindFirstAncestorWhichIsA("Tool") then
local lltm = ltm
if Reanimate.FirstPersonBody then
lltm = 0
if v.Name == "Head" then
lltm = ltm
else
local lol = v:FindFirstChild("AccessoryWeld")
if lol and lol:IsA("Weld") and lol.Part1 and lol.Part1.Name == "Head" then
lltm = ltm
end
end
end
v.LocalTransparencyModifier = lltm
end
end
for _,v in ReanimCharacter:GetChildren() do
if v:IsA("BasePart") then
if table.find(LimbNames, v.Name) then
v.Transparency = ReanimOkay and 1 or Reanimate.PlaceholderTransparency
end
end
end
if Character and Humanoid and RootPart then
RunService.Heartbeat:Wait()
local t = os.clock()
if RCRootPart and RCTorso then
if LimbReanimator.Mode == 1 then
rootcf = CFrame.new(rootposition2)
end
if LimbReanimator.Mode == 2 or workspace.StreamingEnabled then
rootcf = CFrame.new(RCRootPart.Position + Vector3.new(0, -16, 0))
end
if LimbReanimator.Mode == 3 then
rootcf = RCRootPart.CFrame
end
if LimbReanimator.Mode == 4 then
rootcf = RCTorso.CFrame
end
if LimbReanimator.Velocity == 1 then
rootvel = RCRootPart.Velocity
elseif LimbReanimator.Velocity == 2 then
rootvel = Vector3.new(0, 16384, 0)
end
end
local flingtarget = LimbReanimator.FlingTargets[1]
if flingtarget then
if flingtarget.Time then
if t > flingtarget.Time then
table.remove(LimbReanimator.FlingTargets, 1)
flingtarget = nil
end
else
flingtarget.Time = t + (flingtarget.Duration or (Reanimate.UsePhysicsRepRootPart and (LimbReanimator.UseNaNFling and 1 or 0.5) or 2))
end
end
local flingcf, flinged = CFrame.identity, true
if flingtarget then
flingcf, flinged = Util.PredictionFling(flingtarget.Target)
if flinged then
table.remove(LimbReanimator.FlingTargets, 1)
flingtarget = nil
end
end
UpdateTransforms(ReanimCharacter, RootPart, rootcf, rootvel, flingtarget, flingcf)
if LimbReanimator.UseNaNFling then
if os.clock() - lastspawn > 0.1 then
pcall(sethiddenproperty, Humanoid, "MoveDirectionInternal", Vector3.new(0/0, 0/0, 0/0))
else
pcall(sethiddenproperty, Humanoid, "MoveDirectionInternal", Vector3.zero)
end
pcall(sethiddenproperty, Humanoid, "NetworkHumanoidState", Enum.HumanoidStateType.Freefall.Value)
else
pcall(sethiddenproperty, Humanoid, "NetworkHumanoidState", Enum.HumanoidStateType.Flying.Value)
end
end
RunService.PreRender:Wait()
if Reanimate:ShouldRotationType() then
Reanimate:CameraLockCharacter()
end
if Character and Humanoid and RootPart then
UpdateTransforms(ReanimCharacter, RootPart, rootcf, rootvel, flingtarget, flingcf)
end
end
end
CharConn:Disconnect()
if RealChar() then
local h = RealChar():FindFirstChild("Humanoid")
if h then
h:SetStateEnabled(Enum.HumanoidStateType.Dead, true)
h:ChangeState(Enum.HumanoidStateType.Dead)
end
end
Reanimate.Stopping = false
Reanimate.DestroyCharacter()
end
local HatReanimator = {}
HatReanimator.Name = "Hats"
SaveData.Reanimator.HatsCollide = not not SaveData.Reanimator.HatsCollide
SaveData.Reanimator.HatsCollideMethod = SaveData.Reanimator.HatsCollideMethod or 6
SaveData.Reanimator.IWantAllHats = not not SaveData.Reanimator.IWantAllHats
SaveData.Reanimator.IWantHatCollide = SaveData.Reanimator.IWantHatCollide or 3
SaveData.Reanimator.HatsPatchmahub = not not SaveData.Reanimator.HatsPatchmahub
SaveData.Reanimator.RespawnPosition = SaveData.Reanimator.RespawnPosition or 0
SaveData.Reanimator.HatsFling = not not SaveData.Reanimator.HatsFling
SaveData.Reanimator.HatsSpin = not not SaveData.Reanimator.HatsSpin
SaveData.Reanimator.HatsFlingMethod = SaveData.Reanimator.HatsFlingMethod or 1
SaveData.Reanimator.NoToolHolding = not not SaveData.Reanimator.NoToolHolding
SaveData.Reanimator.HatsToolAnim = SaveData.Reanimator.HatsToolAnim or 0
HatReanimator.HatCollide = SaveData.Reanimator.HatsCollide
HatReanimator.HatCollideMethod = SaveData.Reanimator.HatsCollideMethod
HatReanimator.IWantAllHats = SaveData.Reanimator.IWantAllHats
HatReanimator.IWantHatCollide = SaveData.Reanimator.IWantHatCollide
HatReanimator.Permadeath = false
HatReanimator.RespawnPosition = SaveData.Reanimator.RespawnPosition
HatReanimator.HatFling = SaveData.Reanimator.HatsFling
HatReanimator.HatSpin = SaveData.Reanimator.HatsSpin
HatReanimator.FlingMethod = SaveData.Reanimator.HatsFlingMethod
HatReanimator.ToolHolding = not SaveData.Reanimator.NoToolHolding
HatReanimator.ToolAnimMethod = SaveData.Reanimator.HatsToolAnim
HatReanimator.UseNaNFling = true
HatReanimator.HasPermadeath = false
HatReanimator.HasHatCollide = false
HatReanimator.RebuildRequired = true
HatReanimator.HatMapSummary = "(no hat map yet, please * Reanimate * to build)"
HatReanimator.HatCFrameOverride = {}
HatReanimator.Status = {
Permadeath = "(no status)",
HatCollide = "(no status)",
RespawnFling = "(no status)",
}
function HatReanimator.ShowHitboxes()
if RealChar() then
for _,v in RealChar():GetChildren() do
if v:IsA("Accessory") then
local handle = v:FindFirstChild("Handle")
if handle and handle:IsA("BasePart") then
if handle:GetAttribute("_Uhhhhhh_HasCollide") then
Util.ShowPartHitbox(handle)
end
end
end
end
end
end
HatReanimator.FlingTargets = {}
HatReanimator._TempNotFling = {}
function HatReanimator.Fling(target, duration)
if HatReanimator.FlingMethod == -1 then return end
if not target then return false end
for _,v in HatReanimator.FlingTargets do
if v.Target == target then
return false
end
end
if target == Reanimate.Character then return false end
if target == RealChar() then return false end
if typeof(target) == "Instance" then
if HatReanimator._TempNotFling[target] then return end
HatReanimator._TempNotFling[target] = true
task.delay(1, function()
HatReanimator._TempNotFling[target] = nil
end)
end
table.insert(HatReanimator.FlingTargets, {
Target = target,
Duration = duration
})
if typeof(target) == "Instance" then
if target:IsA("Model") then
local h = Util.Instance("Highlight")
h.Adornee = target
h.FillColor = Color3.new(1, 0, 0)
h.OutlineColor = Color3.new(1, 0, 0)
h.FillTransparency = 0.5
h.OutlineTransparency = 0
h.Parent = target
TweenService:Create(h, TweenInfo.new(5), {
FillTransparency = 1,
OutlineTransparency = 1
}):Play()
game.Debris:AddItem(h, 5)
end
end
return true
end
HatReanimator.DontFireCharAddOnThisChar = nil
function HatReanimator.Config(parent)
UI.CreateText(parent, "permadeath is patched, enable this switch if you want to", 10, Enum.TextXAlignment.Center)
UI.CreateSwitch(parent, "Permadeath", HatReanimator.Permadeath).Changed:Connect(function(val)
HatReanimator.Permadeath = val
SaveData.Reanimator.HatsPatchmahub = not val
end)
UI.CreateDropdown(parent, "respawntp", {
"The Void",
"Behind ReanimCharacter",
"Randomtp near",
"At spawn",
}, HatReanimator.RespawnPosition + 1).Changed:Connect(function(val)
HatReanimator.RespawnPosition = val - 1
SaveData.Reanimator.RespawnPosition = val - 1
end)
UI.CreateSwitch(parent, "Hat Collide", HatReanimator.HatCollide).Changed:Connect(function(val)
HatReanimator.HatCollide = val
SaveData.Reanimator.HatsCollide = val
end)
UI.CreateText(parent, "if ur hats get voided when u try to hat collide\nvvv try changing this vvv", 10, Enum.TextXAlignment.Center)
UI.CreateDropdown(parent, "Torso Offset", {
"1 - ShownApe's method (???)",
"2 - STEVE's method V1 (specific)",
"3 - 2 but for back accessories",
"4 - 2 but for shoulder accessories",
"5 - 2 but for waist accessories",
"6 - STEVE's method V2 (kinda stable)",
"7 - 6 but further from void (gl getting hatdrop)",
"8 - STEVE's method V3 (most stable)",
"9 - experimental do not use",
}, HatReanimator.HatCollideMethod + 1).Changed:Connect(function(val)
HatReanimator.HatCollideMethod = val - 1
SaveData.Reanimator.HatsCollideMethod = val - 1
end)
UI.CreateSwitch(parent, "Ensure All Hats", HatReanimator.IWantAllHats).Changed:Connect(function(val)
HatReanimator.IWantAllHats = val
SaveData.Reanimator.IWantAllHats = val
end)
UI.CreateDropdown(parent, "Ensure Hat Collide", {
"Off",
"Atleast one",
"Atleast #hats - 2",
"Atleast #hats - 1",
"ALL",
}, HatReanimator.IWantHatCollide + 1).Changed:Connect(function(val)
HatReanimator.IWantHatCollide = val - 1
SaveData.Reanimator.IWantHatCollide = val - 1
end)
UI.CreateText(parent, "vvv dont use these two options with target fling... vvv", 10, Enum.TextXAlignment.Center)
UI.CreateSwitch(parent, "Hat Fling", HatReanimator.HatFling).Changed:Connect(function(val)
HatReanimator.HatFling = val
SaveData.Reanimator.HatsFling = val
end)
UI.CreateText(parent, "^^^ ...unless you want to walkfling or... ^^^", 10, Enum.TextXAlignment.Center)
UI.CreateSwitch(parent, "Hat Spin Fling", HatReanimator.HatSpin).Changed:Connect(function(val)
HatReanimator.HatSpin = val
SaveData.Reanimator.HatsSpin = val
end)
UI.CreateText(parent, "^^^ ...unless you want to look glitchy ^^^", 10, Enum.TextXAlignment.Center)
UI.CreateText(parent, "vvv dont use tool fling with physics glue btw vvv", 10, Enum.TextXAlignment.Center)
UI.CreateDropdown(parent, "Target Fling Method", {
"Disabled (RP)",
"Classic Respawn",
"Biggest Hat",
"All Hats",
"Use Tool Handle",
}, HatReanimator.FlingMethod + 2).Changed:Connect(function(val)
HatReanimator.FlingMethod = val - 2
SaveData.Reanimator.HatsFlingMethod = val - 2
end)
UI.CreateSwitch(parent, "Tool Holding", HatReanimator.ToolHolding).Changed:Connect(function(val)
HatReanimator.ToolHolding = val
SaveData.Reanimator.NoToolHolding = val
end)
UI.CreateDropdown(parent, "toolanim Method", {
"Disabled",
"Sword",
}, HatReanimator.ToolAnimMethod + 1).Changed:Connect(function(val)
HatReanimator.ToolAnimMethod = val - 1
SaveData.Reanimator.HatsToolAnim = val - 1
end)
UI.CreateSeparator(parent)
local HatMapSummaryText = UI.CreateText(parent, HatReanimator.HatMapSummary, 12, Enum.TextXAlignment.Left)
local HatReanimStatusText = UI.CreateText(parent, "", 12, Enum.TextXAlignment.Left)
Util.LinkDestroyI2C(HatMapSummaryText, RunService.RenderStepped:Connect(function()
HatMapSummaryText.Text = HatReanimator.HatMapSummary
local str = ""
for name, stat in HatReanimator.Status do
str ..= name .. ": " .. stat .. "\n"
end
HatReanimStatusText.Text = str:sub(1, -2)
end))
UI.CreateButton(parent, "Rebuild Hat Map", 20).Activated:Connect(function()
HatReanimator.RebuildRequired = true
end)
UI.CreateText(parent, "^^^ if ur rig built wrong or u switched to a new rig ^^^\nthis button is for you", 10, Enum.TextXAlignment.Center)
UI.CreateButton(parent, "Respawn", 20).Activated:Connect(function()
end)
end
HatReanimator.GetHatMap = function() end
HatReanimator.GetHatCFrameMeshAndTexture = function() end
HatReanimator.GetAttachmentCFrame = function() end
function HatReanimator.Start()
local LimbNames = {"Head", "Torso", "Left Arm", "Right Arm", "Left Leg", "Right Leg"}
local Attachments = {
RightShoulderAttachment = {"Right Arm", CFrame.new(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
RightGripAttachment = {"Right Arm", CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
LeftFootAttachment = {"Left Leg", CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
LeftShoulderAttachment = {"Left Arm", CFrame.new(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
LeftGripAttachment = {"Left Arm", CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
RootAttachment = {"HumanoidRootPart", CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
RightFootAttachment = {"Right Leg", CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
NeckAttachment = {"Torso", CFrame.new(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
BodyFrontAttachment = {"Torso", CFrame.new(0, 0, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
BodyBackAttachment = {"Torso", CFrame.new(0, 0, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
LeftCollarAttachment = {"Torso", CFrame.new(-1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
RightCollarAttachment = {"Torso", CFrame.new(1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
WaistFrontAttachment = {"Torso", CFrame.new(0, -1, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
WaistCenterAttachment = {"Torso", CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
WaistBackAttachment = {"Torso", CFrame.new(0, -1, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
HairAttachment = {"Head", CFrame.new(0, 0.6, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
HatAttachment = {"Head", CFrame.new(0, 0.6, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
FaceFrontAttachment = {"Head", CFrame.new(0, 0, -0.6, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
FaceCenterAttachment = {"Head", CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)},
}
local HatMeshDatabase, HatNameDatabase, HatKnownAccessoriesDatabase = loadstring(readfile("UhhhhhhReanim/BuiltinModules/d_hatsmap.lua"))()
local function GetTools()
local tools = {}
local character, backpack = RealChar(), Player:FindFirstChildOfClass("Backpack")
if character then
for _,v in character:GetChildren() do
if v:IsA("Tool") then
table.insert(tools, v)
end
end
end
if backpack then
for _,v in backpack:GetChildren() do
if v:IsA("Tool") then
table.insert(tools, v)
end
end
end
return tools
end
local function GetHatMeshAndTexture(hat)
local handle = hat:FindFirstChild("Handle")
if handle then
local mesh, tex = nil, nil
if handle:IsA("MeshPart") then
return handle.MeshId, handle.TextureID
elseif handle:IsA("BasePart") then
local sm = handle:FindFirstChildOfClass("SpecialMesh")
if sm then
return sm.MeshId, sm.TextureId
end
end
end
return nil, nil
end
local function AssetIdMatch(a, b)
a = a or ""
b = b or ""
if #b == 0 then return true end
if #a == 0 then return false end
if a:sub(1, 11) == "rbxasset://" then
a = a:match("rbxasset://(.+)")
elseif a:sub(1, 13) == "rbxassetid://" then
a = a:match("rbxassetid://(%d+)")
elseif a:sub(1, 4) == "http" then
a = a:match("id=(%d+)")
end
return a == b
end
local function ClassifyHat(hat)
local handle = hat:FindFirstChild("Handle")
local mesh, tex = GetHatMeshAndTexture(hat)
if handle and handle:IsA("BasePart") and mesh and tex then
local mapdata = {
Name = hat.Name,
MeshId = mesh, TextureId = tex,
C0 = CFrame.identity,
C1 = CFrame.identity,
Scale = 1,
Limb = "HumanoidRootPart",
Group = "RIG",
Attachments = nil,
}
local originalsize = handle:FindFirstChild("OriginalSize")
if originalsize and originalsize:IsA("Vector3Value") then
originalsize = originalsize.Value
local m1 = math.max(handle.Size.X, handle.Size.Y, handle.Size.Z)
local m2 = math.max(originalsize.X, originalsize.Y, originalsize.Z)
if m2 > 0 then
mapdata.Scale = m1 / m2
end
else
originalsize = handle.Size
end
for _,data in HatReanimator.HatCFrameOverride do
if data.MeshId and data.TextureId then
if AssetIdMatch(mesh, data.MeshId) and AssetIdMatch(tex, data.TextureId) then
return mapdata, "Unknown", 4
end
end
end
for _,data in HatKnownAccessoriesDatabase do
if AssetIdMatch(mesh, data.MeshId) and AssetIdMatch(tex, data.TextureId) then
mapdata.C0 = data.C0
mapdata.C1 = data.C1
mapdata.Limb = data.Limb
mapdata.Group = data.Group
mapdata.Attachments = data.Attachments
return mapdata, "Accessories", 0
end
end
for _,data in HatNameDatabase do
if hat.Name:lower() == data.Match:lower() then
mapdata.C1 = data.Offset
mapdata.Attachments = data.Attachments
return mapdata, data.For, 1
end
end
for _,data in HatMeshDatabase do
if AssetIdMatch(mesh, data.MeshId) and AssetIdMatch(tex, data.TextureId) then
mapdata.C1 = data.Offset
mapdata.Attachments = data.Attachments
return mapdata, data.For, 2
end
end
local assumption = originalsize
local m = math.min(assumption.X, assumption.Y, assumption.Z)
if m >= 0.25 then
assumption = Vector3.new(
math.round(assumption.X / m),
math.round(assumption.Y / m),
math.round(assumption.Z / m)
)
else
assumption = Vector3.zero
end
if assumption == Vector3.new(2, 2, 1) then
mapdata.C1 = CFrame.identity
return mapdata, "Torso", 3
elseif assumption == Vector3.new(2, 1, 2) then
mapdata.C1 = CFrame.Angles(1.57, 0, 0)
return mapdata, "Torso", 3
elseif assumption == Vector3.new(1, 2, 2) then
mapdata.C1 = CFrame.Angles(0, 1.57, 0)
return mapdata, "Torso", 3
elseif assumption == Vector3.new(1, 2, 1) then
mapdata.C1 = CFrame.identity
return mapdata, "ArmLeg", 3
elseif assumption == Vector3.new(1, 1, 2) then
mapdata.C1 = CFrame.Angles(1.57, 0, 0)
return mapdata, "ArmLeg", 3
elseif assumption == Vector3.new(2, 1, 1) then
mapdata.C1 = CFrame.Angles(0, 0, 1.57)
return mapdata, "ArmLeg", 3
elseif handle:FindFirstChild("HatAttachment") and assumption == Vector3.new(1, 1, 1) and m < 1.2 then
mapdata.C1 = CFrame.Angles(1.57, 0, 0)
return mapdata, "Block", 3
end
return mapdata, "Unknown", 4
end
return nil
end
local BaseParts = {}
local CharTools = {}
local CharHats = {}
local HatRefs = {}
local Hat2HatRefs = {}
local function ResetHatRefs()
table.clear(Hat2HatRefs)
for _,ref in HatRefs do
ref.Hat = nil
ref.Han = nil
end
end
local function CreatePlaceholder(hat)
local h = hat:FindFirstChild("Handle")
if h and h:IsA("BasePart") then
local p = h:Clone()
p:BreakJoints()
p.Anchored = true
p.CanCollide = false
p.CanTouch = false
p.CanQuery = false
p.Transparency = 0.75
p.Name = "(C) Uhhhhhh V" .. UhhhhhhVersion .. " :: HAT PLACEHOLDER"
for _,v in p:GetDescendants() do
if v:IsA("LuaSourceContainer") then
v:Destroy()
continue
end
local exist = pcall(function()
return v.LocalTransparencyModifier
end)
if exist then
p:GetPropertyChangedSignal("Transparency"):Connect(function()
v.LocalTransparencyModifier = p.Transparency
end)
end
end
if h:GetAttribute("AttachHead") then
p:SetAttribute("AttachHead", true)
end
p.Parent = workspace
return p
end
end
local function RefHatToHatRefs(hat)
local handle = hat:FindFirstChild("Handle")
local mesh, tex = GetHatMeshAndTexture(hat)
if handle and mesh and tex then
for _,ref in HatRefs do
if not ref.Hat then
if ref.Name == hat.Name and ref.MeshId == mesh and ref.TextureId == tex then
ref.Hat = hat
ref.Han = handle
if ref.Map.Limb == "Head" then
handle:SetAttribute("AttachHead", true)
end
Hat2HatRefs[hat] = ref
if not ref.PH then
ref.PH = CreatePlaceholder(hat)
end
return
end
end
end
HatReanimator.RebuildRequired = true
end
end
local HatMap = {}
local HatMapCopy = {}
local function RefreshHatMap(Character)
local summary = ""
summary ..= "[Hat Map Summary]\n"
summary ..= "Total hats found: " .. #CharHats .. "\n"
local hatfors = {
Head = {},
Torso = {},
LeftArm = {},
RightArm = {},
LeftLeg = {},
RightLeg = {},
ArmLeg = {},
Block = {},
Accessories = {},
Unknown = {},
}
for _,hat in CharHats do
local mapdata, usefor, level = ClassifyHat(hat)
if mapdata and hatfors[usefor] then
table.insert(hatfors[usefor], {hat, mapdata, level})
end
end
summary ..= "Classified "
for name,arr in hatfors do
table.sort(arr, function(a, b)
return a[3] < b[3]
end)
summary ..= #arr .. " " .. name .. ", "
end
summary = summary:sub(1, -3) .. ".\n"
summary ..= "Rig Building:\n"
local hatrig = {
Head = nil,
Torso = nil,
LeftArm = nil,
RightArm = nil,
LeftLeg = nil,
RightLeg = nil,
}
if #hatfors.Head > 0 then
summary ..= " 1 Head as Head (perfect match)\n"
hatrig.Head = table.remove(hatfors.Head, 1)
end
if #hatfors.Torso > 0 then
summary ..= " 1 Torso as Torso (perfect match)\n"
hatrig.Torso = table.remove(hatfors.Torso, 1)
end
if #hatfors.LeftArm > 0 then
summary ..= " 1 LeftArm as LeftArm (perfect match)\n"
hatrig.LeftArm = table.remove(hatfors.LeftArm, 1)
end
if #hatfors.RightArm > 0 then
summary ..= " 1 RightArm as RightArm (perfect match)\n"
hatrig.RightArm = table.remove(hatfors.RightArm, 1)
end
if #hatfors.LeftLeg > 0 then
summary ..= " 1 LeftLeg as LeftLeg (perfect match)\n"
hatrig.LeftLeg = table.remove(hatfors.LeftLeg, 1)
end
if #hatfors.RightLeg > 0 then
summary ..= " 1 RightLeg as RightLeg (perfect match)\n"
hatrig.RightLeg = table.remove(hatfors.RightLeg, 1)
end
local limbstobuild = {}
if not hatrig.LeftArm then
if #hatfors.RightArm > 0 then
hatrig.LeftArm = table.remove(hatfors.RightArm, 1)
summary ..= " 1 RightArm as LeftArm (hat reused)\n"
elseif #hatfors.LeftLeg > 0 then
hatrig.LeftArm = table.remove(hatfors.LeftLeg, 1)
summary ..= " 1 LeftLeg as LeftArm (hat reused)\n"
elseif #hatfors.RightLeg > 0 then
hatrig.LeftArm = table.remove(hatfors.RightLeg, 1)
summary ..= " 1 RightLeg as LeftArm (hat reused)\n"
elseif #hatfors.ArmLeg > 0 then
hatrig.LeftArm = table.remove(hatfors.ArmLeg, 1)
summary ..= " 1 ArmLeg as LeftArm (purpose match)\n"
else
table.insert(limbstobuild, "Left Arm")
end
end
if not hatrig.RightArm then
if #hatfors.LeftArm > 0 then
hatrig.RightArm = table.remove(hatfors.LeftArm, 1)
summary ..= " 1 LeftArm as RightArm (hat reused)\n"
elseif #hatfors.RightLeg > 0 then
hatrig.RightArm = table.remove(hatfors.RightLeg, 1)
summary ..= " 1 RightLeg as RightArm (hat reused)\n"
elseif #hatfors.LeftLeg > 0 then
hatrig.RightArm = table.remove(hatfors.LeftLeg, 1)
summary ..= " 1 LeftLeg as RightArm (hat reused)\n"
elseif #hatfors.ArmLeg > 0 then
hatrig.RightArm = table.remove(hatfors.ArmLeg, 1)
summary ..= " 1 ArmLeg as RightArm (purpose match)\n"
else
table.insert(limbstobuild, "Right Arm")
end
end
if not hatrig.LeftLeg then
if #hatfors.RightLeg > 0 then
hatrig.LeftLeg = table.remove(hatfors.RightLeg, 1)
summary ..= " 1 RightLeg as LeftLeg (hat reused)\n"
elseif #hatfors.LeftArm > 0 then
hatrig.LeftLeg = table.remove(hatfors.LeftArm, 1)
summary ..= " 1 LeftArm as LeftLeg (hat reused)\n"
elseif #hatfors.RightArm > 0 then
hatrig.LeftLeg = table.remove(hatfors.RightArm, 1)
summary ..= " 1 LeftLeg as LeftLeg (hat reused)\n"
elseif #hatfors.ArmLeg > 0 then
hatrig.LeftLeg = table.remove(hatfors.ArmLeg, 1)
summary ..= " 1 ArmLeg as LeftLeg (purpose match)\n"
else
table.insert(limbstobuild, "Left Leg")
end
end
if not hatrig.RightLeg then
if #hatfors.LeftLeg > 0 then
hatrig.RightLeg = table.remove(hatfors.LeftLeg, 1)
summary ..= " 1 LeftLeg as RightLeg (hat reused)\n"
elseif #hatfors.RightArm > 0 then
hatrig.RightLeg = table.remove(hatfors.RightArm, 1)
summary ..= " 1 RightArm as RightLeg (hat reused)\n"
elseif #hatfors.LeftArm > 0 then
hatrig.RightLeg = table.remove(hatfors.LeftArm, 1)
summary ..= " 1 LeftArm as RightLeg (hat reused)\n"
elseif #hatfors.ArmLeg > 0 then
hatrig.RightLeg = table.remove(hatfors.ArmLeg, 1)
summary ..= " 1 ArmLeg as RightLeg (purpose match)\n"
else
table.insert(limbstobuild, "Right Leg")
end
end
for _,v in HatRefs do if v.PH then v.PH:Destroy() end end
table.clear(Hat2HatRefs)
table.clear(HatRefs)
table.clear(HatMap)
local function addhat(limb, data)
if data and data[2] then
data = data[2]
if limb then
data.Limb = limb
end
local index = #HatMap
data.Index = index
table.insert(HatMap, data)
table.insert(HatRefs, {
Name = data.Name,
MeshId = data.MeshId, TextureId = data.TextureId,
Map = data,
Index = index,
PH = nil,
Hat = nil,
})
end
end
addhat("Head", hatrig.Head)
addhat("Torso", hatrig.Torso)
addhat("Left Arm", hatrig.LeftArm)
addhat("Right Arm", hatrig.RightArm)
addhat("Left Leg", hatrig.LeftLeg)
addhat("Right Leg", hatrig.RightLeg)
if #limbstobuild > 0 and #hatfors.Block > 0 then
local blocks = {}
local i = 0
while i < #limbstobuild * 2 and #hatfors.Block > 0 do
local name = limbstobuild[(i % #limbstobuild) + 1]
if not blocks[name] then
blocks[name] = {}
end
table.insert(blocks[name], table.remove(hatfors.Block, 1))
i += 1
end
for name,v in blocks do
if #v == 2 then
local a, b = v[1], v[2]
a[2].C0 = CFrame.new(0, -0.5, 0)
b[2].C0 = CFrame.new(0, 0.5, 0)
addhat(name, a)
addhat(name, b)
summary ..= " 2 Block as " .. name:gsub(" ", "") .. " (block build)\n"
elseif #v == 1 then
addhat(name, v[1])
summary ..= " 1 Block as " .. name:gsub(" ", "") .. " (block build)\n"
end
end
end
summary ..= " " .. #hatfors.Accessories .. " known accessories\n"
for _,acc in hatfors.Accessories do
addhat(nil, acc)
end
table.clear(hatfors.Accessories)
local unused = 0
local function AttmentGet(name)
for _,data in ipairs(HatMap) do
if data.Attachments and data.Attachments[name] then
return {data.Limb, data.C0 * data.C1:Inverse() * data.Attachments[name]}
end
end
return Attachments[name]
end
for _,v in hatfors do
for _,w in v do
local hat = w[1]
local map = w[2]
local limb, c0 = unpack(AttmentGet("HatAttachment"))
local c1 = hat.AttachmentPoint
local handle = hat:FindFirstChild("Handle")
if handle then
for _,x in handle:GetChildren() do
if x:IsA("Attachment") then
local att = AttmentGet(x.Name)
if att then
limb, c0, c1 = att[1], att[2], x.CFrame
break
end
end
end
end
map.C0 = c0
map.C1 = c1
map.Limb = limb
addhat(limb, w)
unused += 1
end
end
summary ..= "...which leaves " .. unused .. " unused."
HatMap.Built = os.clock()
HatMapCopy = Util.DeepcopyTable(HatMap)
for _,v in CharHats do
RefHatToHatRefs(v)
end
HatReanimator.HatMapSummary = summary
HatReanimator.RebuildRequired = false
end
local function GetHatMappedOverride(hatmapped)
local ReanimCharacter = Reanimate.Character
if not ReanimCharacter then return end
local scale = ReanimCharacter:GetScale()
local hatscale = hatmapped.Scale
for _,data in HatReanimator.HatCFrameOverride do
if not data.Disable then
if data.Group and hatmapped.Group == data.Group then
if data.Limb then
return {
C0 = data.C0 or data.Offset or CFrame.identity,
C1 = hatmapped.C1 * (data.C1 or CFrame.identity),
Limb = data.Limb, RepRootPart = data.RepRootPart,
Scale = hatscale,
}
else
return {
C0 = data.C0 or data.CFrame or CFrame.identity,
C1 = hatmapped.C1 * (data.C1 or CFrame.identity),
RepRootPart = data.RepRootPart,
Scale = hatscale,
}
end
end
if data.MeshId or data.TextureId or data.Name then
local oke = true
if data.MeshId then
oke = oke and AssetIdMatch(hatmapped.MeshId, data.MeshId)
end
if data.TextureId then
oke = oke and AssetIdMatch(hatmapped.TextureId, data.TextureId)
end
if data.Name then
oke = oke and hatmapped.Name == data.Name
end
if oke then
return {
C0 = data.C0, C1 = data.C1,
Offset = data.Offset or data.CFrame,
Limb = data.Limb, RepRootPart = data.RepRootPart,
Scale = hatscale,
}
end
end
if data.Index and hatmapped.Index == data.Index then
return {
C0 = data.C0 or data.CFrame or CFrame.identity,
C1 = hatmapped.C1 * (data.C1 or CFrame.identity),
RepRootPart = data.RepRootPart,
Scale = hatscale,
}
end
end
end
return hatmapped
end
local function GetHatMappedMeshAndTexture(mesh, tex, name)
local ReanimCharacter = Reanimate.Character
if not ReanimCharacter then return end
local hatmapped = nil
for _,data in ipairs(HatMap) do
if (name and data.Name == name or not name) and data.MeshId == mesh and data.TextureId == tex then
hatmapped = data
break
end
end
if not hatmapped then return end
return GetHatMappedOverride(hatmapped)
end
local function GetHatMappedCFrame(hatmapped)
local ReanimCharacter = Reanimate.Character
if not ReanimCharacter then return end
local scale = ReanimCharacter:GetScale()
if hatmapped then
local hatscale = hatmapped.Scale
if hatmapped.Limb then
local limb = ReanimCharacter:FindFirstChild(hatmapped.Limb)
if limb and limb:IsA("BasePart") then
if hatmapped.C0 and hatmapped.C1 then
return limb.CFrame * Util.ScaleCFrame(hatmapped.C0, scale) * Util.ScaleCFrame(hatmapped.C1, hatscale):Inverse(), limb.Velocity
end
if hatmapped.Offset then
return limb.CFrame * hatmapped.Offset, limb.Velocity
end
end
else
if hatmapped.C0 and hatmapped.C1 then
return hatmapped.C0 * Util.ScaleCFrame(hatmapped.C1, hatscale):Inverse(), Vector3.zero
end
end
end
return
end
local function GetHatCFrameMeshAndTexture(mesh, tex, name)
return GetHatMappedCFrame(GetHatMappedMeshAndTexture(mesh, tex, name))
end
local function GetHatMapped(hat)
local handle = hat:FindFirstChild("Handle")
if not handle or not handle:IsA("BasePart") then return end
local mesh, tex = GetHatMeshAndTexture(hat)
return GetHatMappedMeshAndTexture(mesh, tex, hat.Name)
end
local function GetHatCFrame(hat)
local handle = hat:FindFirstChild("Handle")
if not handle or not handle:IsA("BasePart") then return end
local mesh, tex = GetHatMeshAndTexture(hat)
return GetHatCFrameMeshAndTexture(mesh, tex, hat.Name)
end
local function GetAttachmentCFrame(name)
local ReanimCharacter = Reanimate.Character
if not ReanimCharacter then return end
local scale = ReanimCharacter:GetScale()
local hatmapped = nil
for _,data in ipairs(HatMap) do
if data.Attachments and data.Attachments[name] then
hatmapped = data
break
end
end
if hatmapped then
local cf = GetHatCFrameMeshAndTexture(hatmapped.MeshId, hatmapped.TextureId)
local att = hatmapped.Attachments[name]
return cf * Util.ScaleCFrame(att, hatmapped.Scale)
end
if Attachments[name] then
local limb = ReanimCharacter:FindFirstChild(Attachments[name][1])
if limb then
return limb.CFrame * Util.ScaleCFrame(Attachments[name][2], scale)
end
end
return
end
HatReanimator.GetHatMap = function() return HatMapCopy end
HatReanimator.GetHatCFrameMeshAndTexture = GetHatCFrameMeshAndTexture
HatReanimator.GetAttachmentCFrame = GetAttachmentCFrame
local InitCFrame = nil
local CurrentCharacter = nil
HatReanimator.RebuildRequired = true
HatReanimator.HatMapSummary = "(no hat map yet...)"
table.clear(HatReanimator.FlingTargets)
local lastsimradchange = 0
local function SetSimulationRadius()
local function setsimrad(plr, radius)
pcall(function()
plr.SimulationRadius = radius
end)
pcall(sethiddenproperty, plr, "SimulationRadius", radius)
end
local r = #Players:GetPlayers() * 1000
setsimrad(Player, r)
end
local function IsNetworkOwner(part)
return part.ReceiveAge == 0
end
local BackendAccoutrementState = {
None = 0,
HasHandle = 1,
InWorkspace = 2,
InCharacter = 3,
Equipped = 4,
}
local function SetAccoutrementState(hat, state)
sethiddenproperty(hat, "BackendAccoutrementState", state)
end
local IsRespawning = false
local function Respawn()
if IsRespawning then return end
IsRespawning = true
end
local function SetUACFrameNetless(handle, dt, newcf, tvel, fling, spin)
if dt <= 0 then return false end
if not (handle:IsA("BasePart") and handle:IsDescendantOf(workspace)) then return false end
local timing = os.clock()
local idlerv = Vector3.new(
math.sin(timing * 14), math.sin(timing * 15 + 1.0472), math.sin(timing * 16 + 2.0944)
)
local idleoff = idlerv * 0.001
local ylimit = FallenPartsDestroyHeight + 5
if newcf.Y < ylimit then
newcf += Vector3.new(0, ylimit - newcf.Y, 0)
end
local speedlimit = 16384
if fling then
speedlimit = math.huge
end
local netless = Reanimate.NetlessVelocity + (math.sin(timing * 0.5) + 1) / 2
local aligned = true
local lastcf = handle:GetAttribute("_Uhhhhhh_LastPosition")
local claimtime = handle:GetAttribute("_Uhhhhhh_ClaimTime")
if typeof(lastcf) ~= "CFrame" then lastcf = handle.CFrame end
if not handle:IsGrounded() and IsNetworkOwner(handle) then
local newpos = newcf.Position
local lastpos = lastcf.Position
local vel = (newpos - lastpos) / dt
if vel.Magnitude < 0.12 then
newcf += idleoff
elseif vel.Magnitude > speedlimit then
vel = vel.Unit * speedlimit
newpos = lastpos + vel * dt
newcf = newcf.Rotation + newpos
aligned = false
end
local rvel = lastcf:ToObjectSpace(newcf)
local a, b = rvel:ToAxisAngle()
rvel = (a * b) / dt
lastcf = newcf
if claimtime then
if timing - claimtime < 5.67 then
handle.Massless = false
handle.CustomPhysicalProperties = nil
else
handle.Massless = true
handle.CustomPhysicalProperties = PhysicalProperties.new(0.01, 0, 0, 0, 0)
end
if timing - claimtime < 0.51 then
handle.AssemblyLinearVelocity = Vector3.new(0, netless, 0)
else
if fling then
handle.AssemblyLinearVelocity = Vector3.new(16384, 16384, 16384)
else
if Reanimate.UsePatchmaLikeNetless then
vel = tvel
vel *= Vector3.new(1, 0, 1)
if vel.Magnitude > netless then
vel = vel.Unit * netless
end
handle.AssemblyLinearVelocity = Vector3.new(vel.X * 10, netless, vel.Z * 10)
else
vel += tvel
vel *= Vector3.new(1, 0, 1)
if vel.Magnitude > netless then
vel = vel.Unit * netless
end
handle.AssemblyLinearVelocity = Vector3.new(vel.X, math.max(vel.Y, netless), vel.Z)
end
end
end
else
claimtime = timing
handle.AssemblyLinearVelocity = Vector3.new(0, netless * 2, 0)
end
handle.CFrame = newcf
if spin then
handle.AssemblyAngularVelocity = Vector3.new(16384, 16384, 16384)
else
if Reanimate.UseAngularVelocity then
handle.AssemblyAngularVelocity = rvel + idleoff
else
handle.AssemblyAngularVelocity = idleoff
end
end
else
claimtime = nil
lastcf = handle.CFrame
aligned = false
end
handle:SetAttribute("_Uhhhhhh_LastPosition", lastcf)
handle:SetAttribute("_Uhhhhhh_ClaimTime", claimtime)
return aligned
end
local ChLoads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted. From: api.github.com, assetgame.roblox.com, discord.gg.
This script reanimates ur body, and also, u can use ur client animations after the reanimation which makes that u can make ur animations Serversided [only animations, not effects or sfx] Tutorial: Execute this script Load ur animation Thats it Also is opensource so u can edit it Credits to uhhh for the base of this script!!

Universal