Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------------------
- -- By ggrelior333_lolz#8481 --
- -------------------------------------------------
- game.StarterGui:SetCore("SendNotification", {
- Title = "TrollhaxxV2 loaded";
- Text = "Go fucking kill them";
- Icon = "";
- Duration = "30";
- callbakc = bindableFunction;
- Button1 = "Ok";
- })
- wait(0.2)
- -- Instances:
- local TrollhaxxV2 = Instance.new("ScreenGui")
- local Main = Instance.new("Frame")
- local Frame = Instance.new("Frame")
- local TextLabel = Instance.new("TextLabel")
- local TextButton = Instance.new("TextButton")
- local TextButton_2 = Instance.new("TextButton")
- local TextButton_3 = Instance.new("TextButton")
- local TextButton_4 = Instance.new("TextButton")
- local Frame_2 = Instance.new("Frame")
- local ImageLabel = Instance.new("ImageLabel")
- local L = Instance.new("Frame")
- local Frame_3 = Instance.new("Frame")
- local TextLabel_2 = Instance.new("TextLabel")
- local TextButton_5 = Instance.new("TextButton")
- local Frame_4 = Instance.new("Frame")
- local TextButton_6 = Instance.new("TextButton")
- local TextButton_7 = Instance.new("TextButton")
- local TextButton_8 = Instance.new("TextButton")
- local Annoy = Instance.new("Frame")
- local Frame_5 = Instance.new("Frame")
- local TextLabel_3 = Instance.new("TextLabel")
- local TextButton_9 = Instance.new("TextButton")
- local Frame_6 = Instance.new("Frame")
- local TextButton_10 = Instance.new("TextButton")
- local TextButton_11 = Instance.new("TextButton")
- --Properties:
- TrollhaxxV2.Name = "TrollhaxxV2"
- TrollhaxxV2.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- TrollhaxxV2.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- Main.Name = "Main"
- Main.Parent = TrollhaxxV2
- Main.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- Main.BorderSizePixel = 0
- Main.Position = UDim2.new(0.287564754, 0, 0.334152341, 0)
- Main.Size = UDim2.new(0, 492, 0, 269)
- Frame.Parent = Main
- Frame.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- Frame.BorderSizePixel = 0
- Frame.Size = UDim2.new(0, 492, 0, 32)
- TextLabel.Parent = Frame
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 2.000
- TextLabel.Size = UDim2.new(0, 492, 0, 32)
- TextLabel.Font = Enum.Font.SourceSans
- TextLabel.Text = "Trollhaxx V2"
- TextLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- TextButton.Parent = Main
- TextButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- TextButton.BorderSizePixel = 0
- TextButton.Position = UDim2.new(0.595528424, 0, 0.769516706, 0)
- TextButton.Size = UDim2.new(0, 174, 0, 49)
- TextButton.Font = Enum.Font.SourceSans
- TextButton.Text = "Local"
- TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.TextScaled = true
- TextButton.TextSize = 14.000
- TextButton.TextWrapped = true
- TextButton_2.Parent = Main
- TextButton_2.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- TextButton_2.BorderSizePixel = 0
- TextButton_2.Position = UDim2.new(0.0508129783, 0, 0.769516706, 0)
- TextButton_2.Size = UDim2.new(0, 174, 0, 49)
- TextButton_2.Font = Enum.Font.SourceSans
- TextButton_2.Text = "Annoy"
- TextButton_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_2.TextScaled = true
- TextButton_2.TextSize = 14.000
- TextButton_2.TextWrapped = true
- TextButton_3.Parent = Main
- TextButton_3.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- TextButton_3.BorderSizePixel = 0
- TextButton_3.Position = UDim2.new(0.949186981, 0, 0, 0)
- TextButton_3.Size = UDim2.new(0, 25, 0, 24)
- TextButton_3.Font = Enum.Font.SourceSans
- TextButton_3.Text = "X"
- TextButton_3.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_3.TextScaled = true
- TextButton_3.TextSize = 14.000
- TextButton_3.TextWrapped = true
- TextButton_4.Parent = Main
- TextButton_4.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- TextButton_4.BorderSizePixel = 0
- TextButton_4.Position = UDim2.new(0.898373961, 0, 0, 0)
- TextButton_4.Size = UDim2.new(0, 25, 0, 24)
- TextButton_4.Font = Enum.Font.SourceSans
- TextButton_4.Text = "_"
- TextButton_4.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_4.TextScaled = true
- TextButton_4.TextSize = 14.000
- TextButton_4.TextWrapped = true
- Frame_2.Parent = Main
- Frame_2.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- Frame_2.BorderSizePixel = 0
- Frame_2.Position = UDim2.new(0, 0, 0.118959107, 0)
- Frame_2.Size = UDim2.new(0, 492, 0, 7)
- ImageLabel.Parent = Main
- ImageLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- ImageLabel.BackgroundTransparency = 1.000
- ImageLabel.BorderSizePixel = 0
- ImageLabel.Position = UDim2.new(0.33739838, 0, 0.211895913, 0)
- ImageLabel.Size = UDim2.new(0, 159, 0, 150)
- ImageLabel.Image = "http://www.roblox.com/asset/?id=502496134"
- ImageLabel.ImageColor3 = Color3.fromRGB(50, 50, 50)
- L.Name = "L"
- L.Parent = TrollhaxxV2
- L.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- L.BorderSizePixel = 0
- L.Position = UDim2.new(0.753022432, 0, 0.186732188, 0)
- L.Size = UDim2.new(0, 243, 0, 389)
- L.Visible = false
- Frame_3.Parent = L
- Frame_3.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- Frame_3.BorderSizePixel = 0
- Frame_3.Size = UDim2.new(0, 243, 0, 32)
- TextLabel_2.Parent = Frame_3
- TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.BackgroundTransparency = 2.000
- TextLabel_2.Size = UDim2.new(0, 243, 0, 32)
- TextLabel_2.Font = Enum.Font.SourceSans
- TextLabel_2.Text = "Local"
- TextLabel_2.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.TextScaled = true
- TextLabel_2.TextSize = 14.000
- TextLabel_2.TextWrapped = true
- TextButton_5.Parent = L
- TextButton_5.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- TextButton_5.BorderSizePixel = 0
- TextButton_5.Position = UDim2.new(0.895689011, 0, 0, 0)
- TextButton_5.Size = UDim2.new(0, 25, 0, 24)
- TextButton_5.Font = Enum.Font.SourceSans
- TextButton_5.Text = "X"
- TextButton_5.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_5.TextScaled = true
- TextButton_5.TextSize = 14.000
- TextButton_5.TextWrapped = true
- Frame_4.Parent = L
- Frame_4.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- Frame_4.BorderSizePixel = 0
- Frame_4.Position = UDim2.new(0, 0, 0.0803986788, 0)
- Frame_4.Size = UDim2.new(0, 243, 0, 7)
- TextButton_6.Parent = L
- TextButton_6.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- TextButton_6.BorderSizePixel = 0
- TextButton_6.Position = UDim2.new(0, 0, 0.179948583, 0)
- TextButton_6.Size = UDim2.new(0, 242, 0, 41)
- TextButton_6.Font = Enum.Font.SourceSans
- TextButton_6.Text = "Fly"
- TextButton_6.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_6.TextScaled = true
- TextButton_6.TextSize = 14.000
- TextButton_6.TextWrapped = true
- TextButton_7.Parent = L
- TextButton_7.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- TextButton_7.BorderSizePixel = 0
- TextButton_7.Position = UDim2.new(0, 0, 0.447300792, 0)
- TextButton_7.Size = UDim2.new(0, 242, 0, 41)
- TextButton_7.Font = Enum.Font.SourceSans
- TextButton_7.Text = "Speed&Jump"
- TextButton_7.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_7.TextScaled = true
- TextButton_7.TextSize = 14.000
- TextButton_7.TextWrapped = true
- TextButton_8.Parent = L
- TextButton_8.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- TextButton_8.BorderSizePixel = 0
- TextButton_8.Position = UDim2.new(0, 0, 0.735218525, 0)
- TextButton_8.Size = UDim2.new(0, 242, 0, 41)
- TextButton_8.Font = Enum.Font.SourceSans
- TextButton_8.Text = "Funny animation (R6 only)"
- TextButton_8.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_8.TextScaled = true
- TextButton_8.TextSize = 14.000
- TextButton_8.TextWrapped = true
- Annoy.Name = "Annoy"
- Annoy.Parent = TrollhaxxV2
- Annoy.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- Annoy.BorderSizePixel = 0
- Annoy.Position = UDim2.new(0.753022432, 0, 0.186732188, 0)
- Annoy.Size = UDim2.new(0, 243, 0, 261)
- Annoy.Visible = false
- Frame_5.Parent = Annoy
- Frame_5.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- Frame_5.BorderSizePixel = 0
- Frame_5.Size = UDim2.new(0, 243, 0, 32)
- TextLabel_3.Parent = Frame_5
- TextLabel_3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_3.BackgroundTransparency = 2.000
- TextLabel_3.Size = UDim2.new(0, 243, 0, 32)
- TextLabel_3.Font = Enum.Font.SourceSans
- TextLabel_3.Text = "Annoy"
- TextLabel_3.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_3.TextScaled = true
- TextLabel_3.TextSize = 14.000
- TextLabel_3.TextWrapped = true
- TextButton_9.Parent = Annoy
- TextButton_9.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- TextButton_9.BorderSizePixel = 0
- TextButton_9.Position = UDim2.new(0.895689011, 0, 0, 0)
- TextButton_9.Size = UDim2.new(0, 25, 0, 24)
- TextButton_9.Font = Enum.Font.SourceSans
- TextButton_9.Text = "X"
- TextButton_9.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_9.TextScaled = true
- TextButton_9.TextSize = 14.000
- TextButton_9.TextWrapped = true
- Frame_6.Parent = Annoy
- Frame_6.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- Frame_6.BorderSizePixel = 0
- Frame_6.Position = UDim2.new(-0.00411522621, 0, 0.122544274, 0)
- Frame_6.Size = UDim2.new(0, 243, 0, 7)
- TextButton_10.Parent = Annoy
- TextButton_10.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- TextButton_10.BorderSizePixel = 0
- TextButton_10.Position = UDim2.new(-0.00411522621, 0, 0.302603215, 0)
- TextButton_10.Size = UDim2.new(0, 242, 0, 41)
- TextButton_10.Font = Enum.Font.SourceSans
- TextButton_10.Text = "Random sound"
- TextButton_10.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_10.TextScaled = true
- TextButton_10.TextSize = 14.000
- TextButton_10.TextWrapped = true
- TextButton_11.Parent = Annoy
- TextButton_11.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
- TextButton_11.BorderSizePixel = 0
- TextButton_11.Position = UDim2.new(-0.00411522621, 0, 0.734410882, 0)
- TextButton_11.Size = UDim2.new(0, 242, 0, 41)
- TextButton_11.Font = Enum.Font.SourceSans
- TextButton_11.Text = "Funny animation (R6 only)"
- TextButton_11.TextColor3 = Color3.fromRGB(255, 255, 255)
- TextButton_11.TextScaled = true
- TextButton_11.TextSize = 14.000
- TextButton_11.TextWrapped = true
- -- Scripts:
- local function OHAHJUB_fake_script() -- TextButton.LocalScript
- local script = Instance.new('LocalScript', TextButton)
- script.Parent.MouseButton1Click:Connect(function()
- script.Parent.Parent.Parent.L.Visible = true
- end)
- end
- coroutine.wrap(OHAHJUB_fake_script)()
- local function LKNK_fake_script() -- TextButton_2.LocalScript
- local script = Instance.new('LocalScript', TextButton_2)
- script.Parent.MouseButton1Click:Connect(function()
- script.Parent.Parent.Parent.Annoy.Visible = true
- end)
- end
- coroutine.wrap(LKNK_fake_script)()
- local function QTQYBF_fake_script() -- Main.Draggable
- local script = Instance.new('LocalScript', Main)
- local frame = script.Parent.Parent.Main
- frame.Draggable = true
- frame.Active = true
- end
- coroutine.wrap(QTQYBF_fake_script)()
- local function VTQW_fake_script() -- TextButton_5.LocalScript
- local script = Instance.new('LocalScript', TextButton_5)
- script.Parent.MouseButton1Click:Connect(function()
- script.Parent.Parent.Visible = false
- end)
- end
- coroutine.wrap(VTQW_fake_script)()
- local function WVMKC_fake_script() -- L.Draggable
- local script = Instance.new('LocalScript', L)
- local frame = script.Parent.Parent.L
- frame.Draggable = true
- frame.Active = true
- end
- coroutine.wrap(WVMKC_fake_script)()
- local function BXLIFX_fake_script() -- TextButton_6.Fly
- local script = Instance.new('LocalScript', TextButton_6)
- -- Created By FormerPocketLegender. Place in starterpack! This is a local script, so it won't work anywhere else :D
- -- Go to line 57 to modify the hotkey to stop flying and to start flying again. I already set "e" to default, you can change it if you want.
- -- Credit by a screen text gui or in game description is appreciated, or else I'll become sad ;(
- script.Parent.MouseButton1Click:Connect(function()
- repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
- local mouse = game.Players.LocalPlayer:GetMouse()
- repeat wait() until mouse
- local plr = game.Players.LocalPlayer
- local torso = plr.Character.Torso
- local flying = true
- local deb = true
- local ctrl = {f = 0, b = 0, l = 0, r = 0}
- local lastctrl = {f = 0, b = 0, l = 0, r = 0}
- local maxspeed = 50
- local speed = 0
- function Fly()
- local bg = Instance.new("BodyGyro", torso)
- bg.P = 9e4
- bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
- bg.cframe = torso.CFrame
- local bv = Instance.new("BodyVelocity", torso)
- bv.velocity = Vector3.new(0,0.1,0)
- bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
- repeat wait()
- plr.Character.Humanoid.PlatformStand = true
- if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
- speed = speed+.5+(speed/maxspeed)
- if speed > maxspeed then
- speed = maxspeed
- end
- elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
- speed = speed-1
- if speed < 0 then
- speed = 0
- end
- end
- if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
- bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
- lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
- elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
- bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
- else
- bv.velocity = Vector3.new(0,0.1,0)
- end
- bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
- until not flying
- ctrl = {f = 0, b = 0, l = 0, r = 0}
- lastctrl = {f = 0, b = 0, l = 0, r = 0}
- speed = 0
- bg:Destroy()
- bv:Destroy()
- plr.Character.Humanoid.PlatformStand = false
- end
- mouse.KeyDown:connect(function(key)
- if key:lower() == "f" then
- if flying then flying = false
- else
- flying = true
- Fly()
- end
- elseif key:lower() == "w" then
- ctrl.f = 1
- elseif key:lower() == "s" then
- ctrl.b = -1
- elseif key:lower() == "a" then
- ctrl.l = -1
- elseif key:lower() == "d" then
- ctrl.r = 1
- end
- end)
- mouse.KeyUp:connect(function(key)
- if key:lower() == "w" then
- ctrl.f = 0
- elseif key:lower() == "s" then
- ctrl.b = 0
- elseif key:lower() == "a" then
- ctrl.l = 0
- elseif key:lower() == "d" then
- ctrl.r = 0
- end
- end)
- Fly()
- end)
- end
- coroutine.wrap(BXLIFX_fake_script)()
- local function MNQAJPU_fake_script() -- TextButton_7.LocalScript
- local script = Instance.new('LocalScript', TextButton_7)
- script.Parent.MouseButton1Click:Connect(function()
- script.Parent.Parent.Parent.Parent.Parent.Players.LocalPlayer.Character.WalkSpeed = 150
- script.Parent.Parent.Parent.Parent.Parent.Players.LocalPlayer.Character.JumpPower = 150
- end)
- end
- coroutine.wrap(MNQAJPU_fake_script)()
- local function HTAIWQ_fake_script() -- TextButton_8.Animation Handler (put in workspace)
- local script = Instance.new('Script', TextButton_8)
- function onPlayerEntered(newPlayer)
- newPlayer.Changed:connect(function (property)
- if (property == "Character") then
- onPlayerRespawned(newPlayer)
- end
- end)
- end
- game.Players.PlayerAdded:connect(onPlayerEntered)
- end
- coroutine.wrap(HTAIWQ_fake_script)()
- local function TPDDN_fake_script() -- nil.Anima
- local script = Instance.new('LocalScript', nil)
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local oldAnimTrack = nil
- local animTable = {}
- local animNames = {
- idle = {
- { id = "rbxassetid://516957254", weight = 9 },
- { id = "rbxassetid://516957254", weight = 1 }
- },
- walk = {
- { id = "rbxassetid://125749145", weight = 10 }
- },
- run = {
- { id = "run.xml", weight = 10 }
- },
- jump = {
- { id = "rbxassetid://125750702", weight = 10 }
- },
- fall = {
- { id = "rbxassetid://125750759", weight = 10 }
- },
- climb = {
- { id = "rbxassetid://125750800", weight = 10 }
- },
- toolnone = {
- { id = "rbxassetid://125750867", weight = 10 }
- },
- toolslash = {
- { id = "rbxassetid://129967390", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "rbxassetid://129967478", weight = 10 }
- },
- wave = {
- { id = "rbxassetid://128777973", weight = 10 }
- },
- point = {
- { id = "rbxassetid://128853357", weight = 10 }
- },
- dance = {
- { id = "rbxassetid://130018893", weight = 10 },
- { id = "rbxassetid://132546839", weight = 10 },
- { id = "rbxassetid://132546884", weight = 10 }
- },
- laugh = {
- { id = "rbxassetid://129423131", weight = 10 }
- },
- cheer = {
- { id = "rbxassetid://=129423030", weight = 10 }
- },
- }
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance = true, laugh = false, cheer = false}
- math.randomseed(tick())
- -- Setup animation objects
- for name, fileList in pairs(animNames) do
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- -- print("Loading anims " .. name)
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.175
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.2
- local jumpMaxLimbVelocity = 0.75
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (oldAnimTrack ~= nil) then
- oldAnimTrack:Stop()
- oldAnimTrack:Destroy()
- oldAnimTrack = nil
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- local repeatAnim = stopAllAnimations()
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.0, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- if (animName ~= currentAnim) then
- if (oldAnimTrack ~= nil) then
- oldAnimTrack:Stop()
- oldAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- load it to the humanoid; get AnimationTrack
- oldAnimTrack = currentAnimTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolOldAnimTrack = nil
- local toolAnimTrack = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- local repeatAnim = stopToolAnimations()
- playToolAnimation(repeatAnim, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- if (animName ~= toolAnimName) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- load it to the humanoid; get AnimationTrack
- toolOldAnimTrack = toolAnimTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed>0 then
- playAnimation("walk", 0.1, Humanoid)
- pose = "Running"
- else
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / 12.0)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- stopAllAnimations()
- moveSit()
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- -- print("Wha " .. pose)
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- if (setAngles) then
- desiredAngle = amplitude * math.sin(time * frequency)
- RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
- LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
- RightHip:SetDesiredAngle(-desiredAngle)
- LeftHip:SetDesiredAngle(-desiredAngle)
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- Game.Players.LocalPlayer.Chatted:connect(function(msg)
- local emote = ""
- if (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- -- print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
- end)
- -- main program
- local runService = game:service("RunService");
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end
- coroutine.wrap(TPDDN_fake_script)()
- local function HIQSCP_fake_script() -- TextButton_9.LocalScript
- local script = Instance.new('LocalScript', TextButton_9)
- script.Parent.MouseButton1Click:Connect(function()
- script.Parent.Parent.Visible = false
- end)
- end
- coroutine.wrap(HIQSCP_fake_script)()
- local function NFJM_fake_script() -- Annoy.Draggable
- local script = Instance.new('LocalScript', Annoy)
- local frame = script.Parent.Parent.Annoy
- frame.Draggable = true
- frame.Active = true
- end
- coroutine.wrap(NFJM_fake_script)()
- local function MSTFBEC_fake_script() -- TextButton_10.LocalScript
- local script = Instance.new('LocalScript', TextButton_10)
- script.Parent.MouseButton1Click:Connect(function()
- game.Workspace.Sound:Play()
- end)
- end
- coroutine.wrap(MSTFBEC_fake_script)()
- local function XQGG_fake_script() -- TextButton_11.Animation Handler (put in workspace)
- local script = Instance.new('Script', TextButton_11)
- function onPlayerEntered(newPlayer)
- newPlayer.Changed:connect(function (property)
- if (property == "Character") then
- onPlayerRespawned(newPlayer)
- end
- end)
- end
- game.Players.PlayerAdded:connect(onPlayerEntered)
- end
- coroutine.wrap(XQGG_fake_script)()
- local function WATSQA_fake_script() -- nil.Anima
- local script = Instance.new('LocalScript', nil)
- function waitForChild(parent, childName)
- local child = parent:findFirstChild(childName)
- if child then return child end
- while true do
- child = parent.ChildAdded:wait()
- if child.Name==childName then return child end
- end
- end
- local Figure = script.Parent
- local Torso = waitForChild(Figure, "Torso")
- local RightShoulder = waitForChild(Torso, "Right Shoulder")
- local LeftShoulder = waitForChild(Torso, "Left Shoulder")
- local RightHip = waitForChild(Torso, "Right Hip")
- local LeftHip = waitForChild(Torso, "Left Hip")
- local Neck = waitForChild(Torso, "Neck")
- local Humanoid = waitForChild(Figure, "Humanoid")
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local oldAnimTrack = nil
- local animTable = {}
- local animNames = {
- idle = {
- { id = "rbxassetid://516957254", weight = 9 },
- { id = "rbxassetid://516957254", weight = 1 }
- },
- walk = {
- { id = "rbxassetid://125749145", weight = 10 }
- },
- run = {
- { id = "run.xml", weight = 10 }
- },
- jump = {
- { id = "rbxassetid://125750702", weight = 10 }
- },
- fall = {
- { id = "rbxassetid://125750759", weight = 10 }
- },
- climb = {
- { id = "rbxassetid://125750800", weight = 10 }
- },
- toolnone = {
- { id = "rbxassetid://125750867", weight = 10 }
- },
- toolslash = {
- { id = "rbxassetid://129967390", weight = 10 }
- -- { id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "rbxassetid://129967478", weight = 10 }
- },
- wave = {
- { id = "rbxassetid://128777973", weight = 10 }
- },
- point = {
- { id = "rbxassetid://128853357", weight = 10 }
- },
- dance = {
- { id = "rbxassetid://130018893", weight = 10 },
- { id = "rbxassetid://132546839", weight = 10 },
- { id = "rbxassetid://132546884", weight = 10 }
- },
- laugh = {
- { id = "rbxassetid://129423131", weight = 10 }
- },
- cheer = {
- { id = "rbxassetid://=129423030", weight = 10 }
- },
- }
- -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
- local emoteNames = { wave = false, point = false, dance = true, laugh = false, cheer = false}
- math.randomseed(tick())
- -- Setup animation objects
- for name, fileList in pairs(animNames) do
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- -- print("Loading anims " .. name)
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = childPart
- local weightObject = childPart:FindFirstChild("Weight")
- if (weightObject == nil) then
- animTable[name][idx].weight = 1
- else
- animTable[name][idx].weight = weightObject.Value
- end
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
- -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
- idx = idx + 1
- end
- end
- -- fallback to defaults
- if (animTable[name].count <= 0) then
- for idx, anim in pairs(fileList) do
- animTable[name][idx] = {}
- animTable[name][idx].anim = Instance.new("Animation")
- animTable[name][idx].anim.Name = name
- animTable[name][idx].anim.AnimationId = anim.id
- animTable[name][idx].weight = anim.weight
- animTable[name].count = animTable[name].count + 1
- animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
- -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
- end
- end
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.175
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.2
- local jumpMaxLimbVelocity = 0.75
- -- functions
- function stopAllAnimations()
- local oldAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
- oldAnim = "idle"
- end
- currentAnim = ""
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- if (oldAnimTrack ~= nil) then
- oldAnimTrack:Stop()
- oldAnimTrack:Destroy()
- oldAnimTrack = nil
- end
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop()
- currentAnimTrack:Destroy()
- currentAnimTrack = nil
- end
- return oldAnim
- end
- function setAnimationSpeed(speed)
- if speed ~= currentAnimSpeed then
- currentAnimSpeed = speed
- currentAnimTrack:AdjustSpeed(currentAnimSpeed)
- end
- end
- function keyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- local repeatAnim = stopAllAnimations()
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.0, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- if (animName ~= currentAnim) then
- if (oldAnimTrack ~= nil) then
- oldAnimTrack:Stop()
- oldAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- load it to the humanoid; get AnimationTrack
- oldAnimTrack = currentAnimTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolOldAnimTrack = nil
- local toolAnimTrack = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- -- print("Keyframe : ".. frameName)
- local repeatAnim = stopToolAnimations()
- playToolAnimation(repeatAnim, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- if (animName ~= toolAnimName) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- local roll = math.random(1, animTable[animName].totalWeight)
- local origRoll = roll
- local idx = 1
- while (roll > animTable[animName][idx].weight) do
- roll = roll - animTable[animName][idx].weight
- idx = idx + 1
- end
- -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
- local anim = animTable[animName][idx].anim
- -- load it to the humanoid; get AnimationTrack
- toolOldAnimTrack = toolAnimTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed>0 then
- playAnimation("walk", 0.1, Humanoid)
- pose = "Running"
- else
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- end
- function onDied()
- pose = "Dead"
- end
- function onJumping()
- playAnimation("jump", 0.1, Humanoid)
- jumpAnimTime = jumpAnimDuration
- pose = "Jumping"
- end
- function onClimbing(speed)
- playAnimation("climb", 0.1, Humanoid)
- setAnimationSpeed(speed / 12.0)
- pose = "Climbing"
- end
- function onGettingUp()
- pose = "GettingUp"
- end
- function onFreeFall()
- if (jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- end
- pose = "FreeFall"
- end
- function onFallingDown()
- pose = "FallingDown"
- end
- function onSeated()
- pose = "Seated"
- end
- function onPlatformStanding()
- pose = "PlatformStanding"
- end
- function onSwimming(speed)
- if speed>0 then
- pose = "Running"
- else
- pose = "Standing"
- end
- end
- function getTool()
- for _, kid in ipairs(Figure:GetChildren()) do
- if kid.className == "Tool" then return kid end
- end
- return nil
- end
- function getToolAnim(tool)
- for _, c in ipairs(tool:GetChildren()) do
- if c.Name == "toolanim" and c.className == "StringValue" then
- return c
- end
- end
- return nil
- end
- function animateTool()
- if (toolAnim == "None") then
- playToolAnimation("toolnone", toolTransitionTime, Humanoid)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid)
- return
- end
- end
- function moveSit()
- RightShoulder.MaxVelocity = 0.15
- LeftShoulder.MaxVelocity = 0.15
- RightShoulder:SetDesiredAngle(3.14 /2)
- LeftShoulder:SetDesiredAngle(-3.14 /2)
- RightHip:SetDesiredAngle(3.14 /2)
- LeftHip:SetDesiredAngle(-3.14 /2)
- end
- local lastTick = 0
- function move(time)
- local amplitude = 1
- local frequency = 1
- local deltaTime = time - lastTick
- lastTick = time
- local climbFudge = 0
- local setAngles = false
- if (jumpAnimTime > 0) then
- jumpAnimTime = jumpAnimTime - deltaTime
- end
- if (pose == "FreeFall" and jumpAnimTime <= 0) then
- playAnimation("fall", fallTransitionTime, Humanoid)
- elseif (pose == "Seated") then
- stopAllAnimations()
- moveSit()
- return
- elseif (pose == "Running") then
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- -- print("Wha " .. pose)
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- if (setAngles) then
- desiredAngle = amplitude * math.sin(time * frequency)
- RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
- LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
- RightHip:SetDesiredAngle(-desiredAngle)
- LeftHip:SetDesiredAngle(-desiredAngle)
- end
- -- Tool Animation handling
- local tool = getTool()
- if tool then
- animStringValueObject = getToolAnim(tool)
- if animStringValueObject then
- toolAnim = animStringValueObject.Value
- -- message recieved, delete StringValue
- animStringValueObject.Parent = nil
- toolAnimTime = time + .3
- end
- if time > toolAnimTime then
- toolAnimTime = 0
- toolAnim = "None"
- end
- animateTool()
- else
- stopToolAnimations()
- toolAnim = "None"
- toolAnimTime = 0
- end
- end
- -- connect events
- Humanoid.Died:connect(onDied)
- Humanoid.Running:connect(onRunning)
- Humanoid.Jumping:connect(onJumping)
- Humanoid.Climbing:connect(onClimbing)
- Humanoid.GettingUp:connect(onGettingUp)
- Humanoid.FreeFalling:connect(onFreeFall)
- Humanoid.FallingDown:connect(onFallingDown)
- Humanoid.Seated:connect(onSeated)
- Humanoid.PlatformStanding:connect(onPlatformStanding)
- Humanoid.Swimming:connect(onSwimming)
- -- setup emote chat hook
- Game.Players.LocalPlayer.Chatted:connect(function(msg)
- local emote = ""
- if (string.sub(msg, 1, 3) == "/e ") then
- emote = string.sub(msg, 4)
- elseif (string.sub(msg, 1, 7) == "/emote ") then
- emote = string.sub(msg, 8)
- end
- if (pose == "Standing" and emoteNames[emote] ~= nil) then
- playAnimation(emote, 0.1, Humanoid)
- end
- -- print("===> " .. string.sub(msg, 1, 3) .. "(" .. emote .. ")")
- end)
- -- main program
- local runService = game:service("RunService");
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent~=nil do
- local _, time = wait(0.1)
- move(time)
- end
- end
- coroutine.wrap(WATSQA_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement