Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Model0 = Instance.new("Model")
- Part1 = Instance.new("Part")
- Sound2 = Instance.new("Sound")
- Sound3 = Instance.new("Sound")
- Sound4 = Instance.new("Sound")
- Decal5 = Instance.new("Decal")
- SpecialMesh6 = Instance.new("SpecialMesh")
- Weld7 = Instance.new("Weld")
- Part8 = Instance.new("Part")
- Decal9 = Instance.new("Decal")
- Motor6D10 = Instance.new("Motor6D")
- Motor6D11 = Instance.new("Motor6D")
- Motor6D12 = Instance.new("Motor6D")
- Motor6D13 = Instance.new("Motor6D")
- Motor6D14 = Instance.new("Motor6D")
- Part15 = Instance.new("Part")
- Part16 = Instance.new("Part")
- Part17 = Instance.new("Part")
- Part18 = Instance.new("Part")
- Humanoid19 = Instance.new("Humanoid")
- Part20 = Instance.new("Part")
- Motor6D21 = Instance.new("Motor6D")
- Script22 = Instance.new("Script")
- BodyColors23 = Instance.new("BodyColors")
- Script24 = Instance.new("Script")
- StringValue25 = Instance.new("StringValue")
- Animation26 = Instance.new("Animation")
- StringValue27 = Instance.new("StringValue")
- Animation28 = Instance.new("Animation")
- StringValue29 = Instance.new("StringValue")
- Animation30 = Instance.new("Animation")
- NumberValue31 = Instance.new("NumberValue")
- Animation32 = Instance.new("Animation")
- NumberValue33 = Instance.new("NumberValue")
- StringValue34 = Instance.new("StringValue")
- Animation35 = Instance.new("Animation")
- StringValue36 = Instance.new("StringValue")
- Animation37 = Instance.new("Animation")
- StringValue38 = Instance.new("StringValue")
- Animation39 = Instance.new("Animation")
- StringValue40 = Instance.new("StringValue")
- Animation41 = Instance.new("Animation")
- StringValue42 = Instance.new("StringValue")
- Animation43 = Instance.new("Animation")
- Sound44 = Instance.new("Sound")
- Script45 = Instance.new("Script")
- Animation46 = Instance.new("Animation")
- CharacterMesh47 = Instance.new("CharacterMesh")
- CharacterMesh48 = Instance.new("CharacterMesh")
- CharacterMesh49 = Instance.new("CharacterMesh")
- CharacterMesh50 = Instance.new("CharacterMesh")
- CharacterMesh51 = Instance.new("CharacterMesh")
- Shirt52 = Instance.new("Shirt")
- Pants53 = Instance.new("Pants")
- Hat54 = Instance.new("Hat")
- Part55 = Instance.new("Part")
- SpecialMesh56 = Instance.new("SpecialMesh")
- Script57 = Instance.new("Script")
- Animation58 = Instance.new("Animation")
- BindableFunction59 = Instance.new("BindableFunction")
- BindableEvent60 = Instance.new("BindableEvent")
- BindableEvent61 = Instance.new("BindableEvent")
- BindableEvent62 = Instance.new("BindableEvent")
- Configuration63 = Instance.new("Configuration")
- ObjectValue64 = Instance.new("ObjectValue")
- Configuration65 = Instance.new("Configuration")
- NumberValue66 = Instance.new("NumberValue")
- BoolValue67 = Instance.new("BoolValue")
- BoolValue68 = Instance.new("BoolValue")
- Vector3Value69 = Instance.new("Vector3Value")
- BoolValue70 = Instance.new("BoolValue")
- BrickColorValue71 = Instance.new("BrickColorValue")
- NumberValue72 = Instance.new("NumberValue")
- NumberValue73 = Instance.new("NumberValue")
- NumberValue74 = Instance.new("NumberValue")
- Model0.Name = "DrTrayBlox"
- Model0.Parent = mas
- Part1.Name = "Head"
- Part1.Parent = Model0
- Part1.BrickColor = BrickColor.new("Pastel brown")
- Part1.Rotation = Vector3.new(0, -57.8199997, 0)
- Part1.Velocity = Vector3.new(1.40129846e-45, 0, 1.40129846e-45)
- Part1.Locked = true
- Part1.FormFactor = Enum.FormFactor.Symmetric
- Part1.Size = Vector3.new(2, 1, 1)
- Part1.CFrame = CFrame.new(20.9954529, 4.50000906, 7.42480421, 0.53263253, 0, -0.846346557, 0, 1, 0, 0.846346557, 0, 0.53263253)
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.Color = Color3.new(1, 0.8, 0.6)
- Part1.Position = Vector3.new(20.9954529, 4.50000906, 7.42480421)
- Part1.Orientation = Vector3.new(0, -57.8199997, 0)
- Part1.Color = Color3.new(1, 0.8, 0.6)
- Sound2.Name = "StomedyHit"
- Sound2.Parent = Part1
- Sound2.Pitch = 1.5
- Sound2.SoundId = "rbxassetid://386946017"
- Sound2.Volume = 1
- Sound3.Name = "StomedyMain"
- Sound3.Parent = Part1
- Sound3.Volume = 1
- Sound3.Looped = true
- Sound4.Name = "StomedyStep"
- Sound4.Parent = Part1
- Sound4.Pitch = 2.0999999046326
- Sound4.SoundId = "rbxassetid://379611235"
- Sound4.Volume = 1
- Decal5.Name = "face"
- Decal5.Parent = Part1
- Decal5.Texture = "rbxasset://textures/face.png"
- SpecialMesh6.Parent = Part1
- SpecialMesh6.MeshId = "http://www.roblox.com/asset/?id=83001675"
- SpecialMesh6.Scale = Vector3.new(1.25, 1.25, 1.25)
- SpecialMesh6.MeshType = Enum.MeshType.FileMesh
- SpecialMesh6.Scale = Vector3.new(1.25, 1.25, 1.25)
- Weld7.Name = "HeadWeld"
- Weld7.Parent = Part1
- Weld7.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld7.C1 = CFrame.new(0, 0.200000003, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld7.Part0 = Part1
- Weld7.Part1 = Part55
- Part8.Name = "Torso"
- Part8.Parent = Model0
- Part8.BrickColor = BrickColor.new("White")
- Part8.Rotation = Vector3.new(0, -57.8199997, 0)
- Part8.Velocity = Vector3.new(1.40129846e-45, 0, 1.40129846e-45)
- Part8.Locked = true
- Part8.FormFactor = Enum.FormFactor.Symmetric
- Part8.Size = Vector3.new(2, 2, 1)
- Part8.CFrame = CFrame.new(20.9954529, 3.00000906, 7.42480421, 0.53263253, 0, -0.846346557, 0, 1, 0, 0.846346557, 0, 0.53263253)
- Part8.LeftSurface = Enum.SurfaceType.Weld
- Part8.RightSurface = Enum.SurfaceType.Weld
- Part8.Color = Color3.new(0.94902, 0.952941, 0.952941)
- Part8.Position = Vector3.new(20.9954529, 3.00000906, 7.42480421)
- Part8.Orientation = Vector3.new(0, -57.8199997, 0)
- Part8.Color = Color3.new(0.94902, 0.952941, 0.952941)
- Decal9.Name = "roblox"
- Decal9.Parent = Part8
- Motor6D10.Name = "Right Shoulder"
- Motor6D10.Parent = Part8
- Motor6D10.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D10.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D10.Part0 = Part8
- Motor6D10.Part1 = Part16
- Motor6D10.MaxVelocity = 0.10000000149012
- Motor6D11.Name = "Left Shoulder"
- Motor6D11.Parent = Part8
- Motor6D11.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D11.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D11.Part0 = Part8
- Motor6D11.Part1 = Part15
- Motor6D11.MaxVelocity = 0.10000000149012
- Motor6D12.Name = "Right Hip"
- Motor6D12.Parent = Part8
- Motor6D12.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D12.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- Motor6D12.Part0 = Part8
- Motor6D12.Part1 = Part18
- Motor6D12.MaxVelocity = 0.10000000149012
- Motor6D13.Name = "Left Hip"
- Motor6D13.Parent = Part8
- Motor6D13.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D13.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- Motor6D13.Part0 = Part8
- Motor6D13.Part1 = Part17
- Motor6D13.MaxVelocity = 0.10000000149012
- Motor6D14.Name = "Neck"
- Motor6D14.Parent = Part8
- Motor6D14.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D14.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D14.Part0 = Part8
- Motor6D14.Part1 = Part1
- Motor6D14.MaxVelocity = 0.10000000149012
- Part15.Name = "Left Arm"
- Part15.Parent = Model0
- Part15.BrickColor = BrickColor.new("Pastel brown")
- Part15.Rotation = Vector3.new(0, -57.8199997, 0)
- Part15.Velocity = Vector3.new(1.40129846e-45, 0, 1.40129846e-45)
- Part15.CanCollide = false
- Part15.Locked = true
- Part15.FormFactor = Enum.FormFactor.Symmetric
- Part15.Size = Vector3.new(1, 2, 1)
- Part15.CFrame = CFrame.new(20.1965046, 3.00000906, 6.1552844, 0.53263253, 0, -0.846346557, 0, 1, 0, 0.846346557, 0, 0.53263253)
- Part15.Color = Color3.new(1, 0.8, 0.6)
- Part15.Position = Vector3.new(20.1965046, 3.00000906, 6.1552844)
- Part15.Orientation = Vector3.new(0, -57.8199997, 0)
- Part15.Color = Color3.new(1, 0.8, 0.6)
- Part16.Name = "Right Arm"
- Part16.Parent = Model0
- Part16.BrickColor = BrickColor.new("Pastel brown")
- Part16.Rotation = Vector3.new(0, -57.8199997, 0)
- Part16.Velocity = Vector3.new(1.40129846e-45, 0, 1.40129846e-45)
- Part16.CanCollide = false
- Part16.Locked = true
- Part16.FormFactor = Enum.FormFactor.Symmetric
- Part16.Size = Vector3.new(1, 2, 1)
- Part16.CFrame = CFrame.new(21.7944012, 3.00000906, 8.69432449, 0.53263253, 0, -0.846346557, 0, 1, 0, 0.846346557, 0, 0.53263253)
- Part16.Color = Color3.new(1, 0.8, 0.6)
- Part16.Position = Vector3.new(21.7944012, 3.00000906, 8.69432449)
- Part16.Orientation = Vector3.new(0, -57.8199997, 0)
- Part16.Color = Color3.new(1, 0.8, 0.6)
- Part17.Name = "Left Leg"
- Part17.Parent = Model0
- Part17.BrickColor = BrickColor.new("Medium blue")
- Part17.Rotation = Vector3.new(0, -57.8199997, 0)
- Part17.Velocity = Vector3.new(1.40129846e-45, 0, 1.40129846e-45)
- Part17.CanCollide = false
- Part17.Locked = true
- Part17.FormFactor = Enum.FormFactor.Symmetric
- Part17.Size = Vector3.new(1, 2, 1)
- Part17.CFrame = CFrame.new(20.7291374, 1.00000906, 7.00163078, 0.53263253, 0, -0.846346557, 0, 1, 0, 0.846346557, 0, 0.53263253)
- Part17.BottomSurface = Enum.SurfaceType.Smooth
- Part17.Color = Color3.new(0.431373, 0.6, 0.792157)
- Part17.Position = Vector3.new(20.7291374, 1.00000906, 7.00163078)
- Part17.Orientation = Vector3.new(0, -57.8199997, 0)
- Part17.Color = Color3.new(0.431373, 0.6, 0.792157)
- Part18.Name = "Right Leg"
- Part18.Parent = Model0
- Part18.BrickColor = BrickColor.new("Medium blue")
- Part18.Rotation = Vector3.new(0, -57.8199997, 0)
- Part18.Velocity = Vector3.new(1.40129846e-45, 0, 1.40129846e-45)
- Part18.CanCollide = false
- Part18.Locked = true
- Part18.FormFactor = Enum.FormFactor.Symmetric
- Part18.Size = Vector3.new(1, 2, 1)
- Part18.CFrame = CFrame.new(21.2617683, 1.00000906, 7.84797764, 0.53263253, 0, -0.846346557, 0, 1, 0, 0.846346557, 0, 0.53263253)
- Part18.BottomSurface = Enum.SurfaceType.Smooth
- Part18.Color = Color3.new(0.431373, 0.6, 0.792157)
- Part18.Position = Vector3.new(21.2617683, 1.00000906, 7.84797764)
- Part18.Orientation = Vector3.new(0, -57.8199997, 0)
- Part18.Color = Color3.new(0.431373, 0.6, 0.792157)
- Humanoid19.Parent = Model0
- Humanoid19.RightLeg = Part18
- Humanoid19.LeftLeg = Part17
- Humanoid19.Torso = Part20
- Part20.Name = "HumanoidRootPart"
- Part20.Parent = Model0
- Part20.Transparency = 1
- Part20.Rotation = Vector3.new(0, -57.8199997, 0)
- Part20.Velocity = Vector3.new(1.40129846e-45, 0, 1.40129846e-45)
- Part20.CanCollide = false
- Part20.Locked = true
- Part20.FormFactor = Enum.FormFactor.Symmetric
- Part20.Size = Vector3.new(2, 2, 1)
- Part20.CFrame = CFrame.new(20.9954529, 3.00000906, 7.42480421, 0.53263253, 0, -0.846346557, 0, 1, 0, 0.846346557, 0, 0.53263253)
- Part20.BottomSurface = Enum.SurfaceType.Smooth
- Part20.TopSurface = Enum.SurfaceType.Smooth
- Part20.Position = Vector3.new(20.9954529, 3.00000906, 7.42480421)
- Part20.Orientation = Vector3.new(0, -57.8199997, 0)
- Motor6D21.Name = "RootJoint"
- Motor6D21.Parent = Part20
- Motor6D21.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D21.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- Motor6D21.Part0 = Part20
- Motor6D21.Part1 = Part8
- Motor6D21.MaxVelocity = 0.10000000149012
- Script22.Name = "Health"
- Script22.Parent = Model0
- table.insert(cors,sandbox(Script22,function()
- --Responsible for regening a player's humanoid's health
- -- declarations
- local Figure = script.Parent
- local Head = Figure:WaitForChild("Head")
- local Humanoid = Figure:WaitForChild("Humanoid")
- local regening = false
- -- regeneration
- function regenHealth()
- if regening then return end
- regening = true
- while Humanoid.Health < Humanoid.MaxHealth do
- local s = wait(1)
- local health = Humanoid.Health
- if health > 0 and health < Humanoid.MaxHealth then
- local newHealthDelta = 250 * s * Humanoid.MaxHealth
- health = health + newHealthDelta
- Humanoid.Health = math.min(health,Humanoid.MaxHealth)
- end
- end
- if Humanoid.Health > Humanoid.MaxHealth then
- Humanoid.Health = Humanoid.MaxHealth
- end
- regening = false
- end
- Humanoid.HealthChanged:connect(regenHealth)
- end))
- BodyColors23.Parent = Model0
- BodyColors23.HeadColor = BrickColor.new("Pastel brown")
- BodyColors23.LeftArmColor = BrickColor.new("Pastel brown")
- BodyColors23.LeftLegColor = BrickColor.new("Medium blue")
- BodyColors23.RightArmColor = BrickColor.new("Pastel brown")
- BodyColors23.RightLegColor = BrickColor.new("Medium blue")
- BodyColors23.TorsoColor = BrickColor.new("White")
- Script24.Name = "AnimateSauce"
- Script24.Parent = Model0
- table.insert(cors,sandbox(Script24,function()
- 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;
- for _,Child in pairs(Figure:GetChildren())do
- if Child and Child.ClassName=="Humanoid"then
- Humanoid=Child;
- end;
- end;
- local pose = "Standing"
- local currentAnim = ""
- local currentAnimInstance = nil
- local currentAnimTrack = nil
- local currentAnimKeyframeHandler = nil
- local currentAnimSpeed = 1.0
- local animTable = {}
- local animNames = {
- idle = {
- { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
- { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
- },
- walk = {
- { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
- },
- run = {
- { id = "http://www.roblox.com/asset/?id=252557606", weight = 20 }
- },
- jump = {
- { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
- },
- fall = {
- { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
- },
- climb = {
- { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
- },
- sit = {
- { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
- },
- toolnone = {
- { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
- },
- toolslash = {
- { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
- --{ id = "slash.xml", weight = 10 }
- },
- toollunge = {
- { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
- },
- wave = {
- { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
- },
- point = {
- { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
- },
- dance1 = {
- { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
- },
- dance2 = {
- { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
- },
- dance3 = {
- { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
- { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
- },
- laugh = {
- { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
- },
- cheer = {
- { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
- },
- }
- local dances = {"dance1", "dance2", "dance3"}
- -- 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, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
- function configureAnimationSet(name, fileList)
- if (animTable[name] ~= nil) then
- for _, connection in pairs(animTable[name].connections) do
- connection:disconnect()
- end
- end
- animTable[name] = {}
- animTable[name].count = 0
- animTable[name].totalWeight = 0
- animTable[name].connections = {}
- -- check for config values
- local config = script:FindFirstChild(name)
- if (config ~= nil) then
- --print("Loading anims " .. name)
- table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
- table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
- local idx = 1
- for _, childPart in pairs(config:GetChildren()) do
- if (childPart:IsA("Animation")) then
- table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
- 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
- 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
- -- Setup animation objects
- function scriptChildModified(child)
- local fileList = animNames[child.Name]
- if (fileList ~= nil) then
- configureAnimationSet(child.Name, fileList)
- end
- end
- script.ChildAdded:connect(scriptChildModified)
- script.ChildRemoved:connect(scriptChildModified)
- for name, fileList in pairs(animNames) do
- configureAnimationSet(name, fileList)
- end
- -- ANIMATION
- -- declarations
- local toolAnim = "None"
- local toolAnimTime = 0
- local jumpAnimTime = 0
- local jumpAnimDuration = 0.3
- local toolTransitionTime = 0.1
- local fallTransitionTime = 0.3
- 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 = ""
- currentAnimInstance = nil
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- 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
- local repeatAnim = currentAnim
- -- return to idle if finishing an emote
- if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
- repeatAnim = "idle"
- end
- local animSpeed = currentAnimSpeed
- playAnimation(repeatAnim, 0.0, Humanoid)
- setAnimationSpeed(animSpeed)
- end
- end
- -- Preload animations
- function playAnimation(animName, transitionTime, humanoid)
- 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
- -- switch animation
- if (anim ~= currentAnimInstance) then
- if (currentAnimTrack ~= nil) then
- currentAnimTrack:Stop(transitionTime)
- currentAnimTrack:Destroy()
- end
- currentAnimSpeed = 1.0
- -- load it to the humanoid; get AnimationTrack
- currentAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- currentAnimTrack:Play(transitionTime)
- currentAnim = animName
- currentAnimInstance = anim
- -- set up keyframe name triggers
- if (currentAnimKeyframeHandler ~= nil) then
- currentAnimKeyframeHandler:disconnect()
- end
- currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
- end
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- local toolAnimName = ""
- local toolAnimTrack = nil
- local toolAnimInstance = nil
- local currentToolAnimKeyframeHandler = nil
- function toolKeyFrameReachedFunc(frameName)
- if (frameName == "End") then
- --print("Keyframe : ".. frameName)
- playToolAnimation(toolAnimName, 0.0, Humanoid)
- end
- end
- function playToolAnimation(animName, transitionTime, humanoid)
- 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
- if (toolAnimInstance ~= anim) then
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- transitionTime = 0
- end
- -- load it to the humanoid; get AnimationTrack
- toolAnimTrack = humanoid:LoadAnimation(anim)
- -- play the animation
- toolAnimTrack:Play(transitionTime)
- toolAnimName = animName
- toolAnimInstance = anim
- currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
- end
- end
- function stopToolAnimations()
- local oldAnim = toolAnimName
- if (currentToolAnimKeyframeHandler ~= nil) then
- currentToolAnimKeyframeHandler:disconnect()
- end
- toolAnimName = ""
- toolAnimInstance = nil
- if (toolAnimTrack ~= nil) then
- toolAnimTrack:Stop()
- toolAnimTrack:Destroy()
- toolAnimTrack = nil
- end
- return oldAnim
- end
- -------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------
- function onRunning(speed)
- if speed>0.01 then
- if Figure and Humanoid and Humanoid.WalkSpeed<17 then
- playAnimation("walk", 0.1, Humanoid);
- elseif Figure and Humanoid and Humanoid.WalkSpeed>17 then
- playAnimation("run", 0.1, Humanoid);
- end;
- if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
- setAnimationSpeed(speed / 14.5)
- end
- 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
- playAnimation("sit", 0.5, Humanoid)
- return
- elseif (pose == "Running") then
- if Figure and Humanoid and Humanoid.WalkSpeed<17 then
- playAnimation("walk", 0.1, Humanoid);
- elseif Figure and Humanoid and Humanoid.WalkSpeed>17 then
- playAnimation("run", 0.1, Humanoid);
- end;
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- stopAllAnimations()
- amplitude = 0.1
- frequency = 1
- setAngles = true
- end
- if (setAngles) then
- local 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 and tool:FindFirstChild("Handle") then
- local 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"
- toolAnimInstance = nil
- 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)
- local runService = game:GetService("RunService");
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Wait(0)do
- local _,time=wait(0)
- move(time)
- end
- end))
- StringValue25.Name = "climb"
- StringValue25.Parent = Script24
- Animation26.Name = "ClimbAnim"
- Animation26.Parent = StringValue25
- Animation26.AnimationId = "http://www.roblox.com/asset/?id=180436334"
- StringValue27.Name = "fall"
- StringValue27.Parent = Script24
- Animation28.Name = "FallAnim"
- Animation28.Parent = StringValue27
- Animation28.AnimationId = "http://www.roblox.com/asset/?id=180436148"
- StringValue29.Name = "idle"
- StringValue29.Parent = Script24
- Animation30.Name = "Animation1"
- Animation30.Parent = StringValue29
- Animation30.AnimationId = "http://www.roblox.com/asset/?id=180435571"
- NumberValue31.Name = "Weight"
- NumberValue31.Parent = Animation30
- NumberValue31.Value = 9
- Animation32.Name = "Animation2"
- Animation32.Parent = StringValue29
- Animation32.AnimationId = "http://www.roblox.com/asset/?id=180435792"
- NumberValue33.Name = "Weight"
- NumberValue33.Parent = Animation32
- NumberValue33.Value = 1
- StringValue34.Name = "jump"
- StringValue34.Parent = Script24
- Animation35.Name = "JumpAnim"
- Animation35.Parent = StringValue34
- Animation35.AnimationId = "http://www.roblox.com/asset/?id=125750702"
- StringValue36.Name = "run"
- StringValue36.Parent = Script24
- Animation37.Name = "RunAnim"
- Animation37.Parent = StringValue36
- Animation37.AnimationId = "http://www.roblox.com/asset/?id=252557606"
- StringValue38.Name = "sit"
- StringValue38.Parent = Script24
- Animation39.Name = "SitAnim"
- Animation39.Parent = StringValue38
- Animation39.AnimationId = "http://www.roblox.com/asset/?id=178130996"
- StringValue40.Name = "toolnone"
- StringValue40.Parent = Script24
- Animation41.Name = "ToolNoneAnim"
- Animation41.Parent = StringValue40
- Animation41.AnimationId = "http://www.roblox.com/asset/?id=182393478"
- StringValue42.Name = "walk"
- StringValue42.Parent = Script24
- Animation43.Name = "WalkAnim"
- Animation43.Parent = StringValue42
- Animation43.AnimationId = "http://www.roblox.com/asset/?id=180426354"
- Sound44.Name = "Cardboard"
- Sound44.Parent = Model0
- Sound44.SoundId = "rbxassetid://409476963"
- Sound44.Volume = 1
- Sound44.Looped = true
- Script45.Name = "StomedyMain"
- Script45.Parent = Model0
- table.insert(cors,sandbox(Script45,function()
- --[[ By: Brutez. ]]--
- local StomedyScript=script;
- repeat Wait(0)until StomedyScript and StomedyScript.Parent and StomedyScript.Parent:IsA("Model")and StomedyScript.Parent:FindFirstChild("Head")and StomedyScript.Parent:FindFirstChild("Torso");
- local Stomedy=StomedyScript.Parent;
- function raycast(Spos,vec,currentdist)
- local hit2,pos2=game.Workspace:FindPartOnRay(Ray.new(Spos+(vec*.05),vec*currentdist),Stomedy);
- if hit2~=nil and pos2 then
- if hit2.Name=="Handle" and not hit2.CanCollide or string.sub(hit2.Name,1,6)=="Effect"and not hit2.CanCollide then
- local currentdist=currentdist-(pos2-Spos).magnitude;
- return raycast(pos2,vec,currentdist);
- end;
- end;
- return hit2,pos2;
- end;
- function RayCast(Position,Direction,MaxDistance,IgnoreList)
- return Game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position,Direction.unit*(MaxDistance or 999.999)),IgnoreList);
- end;
- local StomedyHumanoid;
- for _,Child in pairs(Stomedy:GetChildren())do
- if Child~=nil and Child:IsA("Humanoid")and Child.Health~=0 then
- StomedyHumanoid=Child;
- end;
- end;
- local AttackDebounce=false;
- local StomedyHead=Stomedy:FindFirstChild("Head");
- local StomedyHumanoidRootPart=Stomedy:FindFirstChild("HumanoidRootPart");
- local WalkDebounce=false;
- local DynamicWander=true;
- local MusicDebounce=false;
- local OriginalC0;
- if StomedyScript~=nil and Stomedy~=nil and Stomedy:FindFirstChild("Torso")and Stomedy:FindFirstChild("Torso"):FindFirstChild("Neck")then
- Stomedy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
- OriginalC0=Stomedy:FindFirstChild("Torso"):FindFirstChild("Neck").C0;
- end;
- function FindNearestBae()
- local NoticeDistance=200;
- local TargetMain;
- for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
- if StomedyScript and Stomedy and StomedyHumanoid and StomedyHumanoid.Health~=0 and TargetModel:IsA("Model")and TargetModel~=Stomedy and TargetModel.Name~=Stomedy.Name and TargetModel:FindFirstChild("Torso")and TargetModel:FindFirstChild("Head")then
- local TargetPart=TargetModel:FindFirstChild("Torso");
- local FoundHumanoid;
- for _,Child in pairs(TargetModel:GetChildren())do
- if Child~=nil and Child:IsA("Humanoid")and Child.Health~=0 then
- FoundHumanoid=Child;
- end;
- end;
- if TargetModel~=nil and TargetPart~=nil and FoundHumanoid~=nil and FoundHumanoid.Health~=0 and(TargetPart.Position-StomedyHumanoidRootPart.Position).magnitude<NoticeDistance then
- TargetMain=TargetPart;
- NoticeDistance=(TargetPart.Position-StomedyHumanoidRootPart.Position).magnitude;
- end;
- end;
- end;
- return TargetMain;
- end;
- while Wait(0)do
- if StomedyScript~=nil and Stomedy~=nil and StomedyHead~=nil and StomedyHead:FindFirstChild("StomedyMain")and not StomedyHead:FindFirstChild("StomedyMain").IsPlaying then
- StomedyHead:FindFirstChild("StomedyMain"):Play();
- end;
- local TargetPoint=StomedyHumanoid.TargetPoint;
- local Blockage,BlockagePos=RayCast((StomedyHumanoidRootPart.CFrame+CFrame.new(StomedyHumanoidRootPart.Position,Vector3.new(TargetPoint.X,StomedyHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(StomedyHumanoidRootPart.Size.Z/2)).p,StomedyHumanoidRootPart.CFrame.lookVector,(StomedyHumanoidRootPart.Size.Z*2.5),{Stomedy,Stomedy})
- local Jumpable=false;
- local MainTarget=FindNearestBae();
- local BlockageHumanoid;
- if Blockage~=nil then
- if Blockage~=nil and Blockage.Parent~=nil and Blockage.Parent:IsA("Model")then
- for _,Child in pairs(Blockage.Parent:GetChildren())do
- if Child~=nil and Child:IsA("Humanoid")and Child.Health~=0 then
- BlockageHumanoid=Child;
- end;
- end;
- end;
- Jumpable=true;
- if Blockage and Blockage:IsA("Terrain")then
- local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
- local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
- if CellMaterial==Enum.CellMaterial.Water or MainTarget and Blockage:IsDescendantOf(MainTarget.Parent)or BlockageHumanoid~=nil then
- Jumpable=false;
- end;
- elseif Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent:IsA("Hat")or Blockage.Name=="Handle"and Blockage.Parent:IsA("Tool")or MainTarget and Blockage:IsDescendantOf(MainTarget.Parent)or BlockageHumanoid~=nil then
- Jumpable=false;
- end;
- end;
- if StomedyScript and Stomedy and StomedyHumanoid and StomedyHumanoid.Health~=0 and not StomedyHumanoid.Sit and Jumpable then
- StomedyHumanoid.Jump=true;
- end;
- if StomedyScript and Stomedy and StomedyHead and StomedyHumanoidRootPart and StomedyHead:FindFirstChild("StomedyStep")and (StomedyHumanoidRootPart.Velocity-Vector3.new(0,StomedyHumanoidRootPart.Velocity.y,0)).magnitude>=5 and not WalkDebounce and StomedyHumanoid and StomedyHumanoid.Health~=0 then
- Spawn(function()
- WalkDebounce=true;
- local FiredRay=Ray.new(StomedyHumanoidRootPart.Position,Vector3.new(0,-4,0));
- local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,Stomedy);
- if RayTarget then
- local StomedyHeadFootStepClone=StomedyHead:FindFirstChild("StomedyStep"):Clone();
- StomedyHeadFootStepClone.Parent=StomedyHead;
- StomedyHeadFootStepClone:Play();
- if StomedyScript and Stomedy and StomedyHumanoid and StomedyHumanoid.Health~=0 and StomedyHumanoid.WalkSpeed<17 then
- Wait(0.4);
- elseif StomedyScript and Stomedy and StomedyHumanoid and StomedyHumanoid.Health~=0 and StomedyHumanoid.WalkSpeed>17 then
- Wait(0.15);
- end
- end;
- WalkDebounce=false;
- end);
- end;
- local MainTarget=FindNearestBae();
- local FoundHumanoid;
- if MainTarget~=nil then
- for _,Child in pairs(MainTarget.Parent:GetChildren())do
- if Child~=nil and Child:IsA("Humanoid")and Child.Health~=0 then
- FoundHumanoid=Child;
- end;
- end;
- end;
- if StomedyScript and Stomedy and StomedyHumanoid and StomedyHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid~=nil and FoundHumanoid.Jump then
- StomedyHumanoid.Jump=true;
- end;
- if not AttackDebounce and StomedyScript~=nil and Stomedy~=nil and StomedyHumanoid~=nil and StomedyHumanoid.Health~=0 and StomedyHead~=nil and StomedyHead:FindFirstChild("StomedyHit")and MainTarget~=nil and FoundHumanoid~=nil and FoundHumanoid.Health~=0 and(MainTarget.Position-StomedyHumanoidRootPart.Position).magnitude<6 then
- local hit,pos=raycast(StomedyHumanoidRootPart.Position,(MainTarget.Position-StomedyHumanoidRootPart.Position).unit,500)
- if hit~=nil and hit:IsDescendantOf(MainTarget.Parent)then
- Spawn(function()
- AttackDebounce=true;
- local SwingAnimation=StomedyHumanoid:LoadAnimation(StomedyScript:FindFirstChild("Swing"));
- SwingAnimation:Play();
- SwingAnimation:AdjustSpeed(2+math.random()*0.6)
- local HitSoundClone=StomedyHead:FindFirstChild("StomedyHit"):Clone();
- HitSoundClone.Pitch=StomedyHead:FindFirstChild("StomedyHit").Pitch+math.random()*0.1;
- HitSoundClone.Parent=StomedyHead;
- HitSoundClone:Play();
- FoundHumanoid:TakeDamage(10);
- Wait(0.2+math.random()*0.2);
- AttackDebounce=false;
- end);
- end;
- end;
- if StomedyScript and Stomedy and StomedyHumanoid and StomedyHumanoid.Health~=0 and MainTarget and FoundHumanoid~=nil and FoundHumanoid.Health~=0 and(MainTarget.Position-StomedyHumanoidRootPart.Position).magnitude<150 then
- if StomedyScript and Stomedy and Stomedy:FindFirstChild("Cardboard")and not Stomedy:FindFirstChild("Cardboard").IsPlaying then
- Stomedy:FindFirstChild("Cardboard").Volume=1;
- Stomedy:FindFirstChild("Cardboard"):Play();
- end;
- elseif StomedyScript and Stomedy and StomedyHumanoid and StomedyHumanoid.Health~=0 and MainTarget and FoundHumanoid~=nil and FoundHumanoid.Health~=0 and(MainTarget.Position-StomedyHumanoidRootPart.Position).magnitude>150 then
- if StomedyScript and Stomedy and Stomedy:FindFirstChild("Cardboard")and Stomedy:FindFirstChild("Cardboard").IsPlaying then
- if not MusicDebounce then
- Spawn(function()
- MusicDebounce=true;
- repeat Wait(0);if StomedyScript and Stomedy and Stomedy:FindFirstChild("Cardboard")then Stomedy:FindFirstChild("Cardboard").Volume=Stomedy:FindFirstChild("Cardboard").Volume-0.01;else break;end;until Stomedy:FindFirstChild("Cardboard").Volume==0 or Stomedy:FindFirstChild("Cardboard").Volume<0;
- if StomedyScript and Stomedy and Stomedy:FindFirstChild("Cardboard")then
- Stomedy:FindFirstChild("Cardboard").Volume=0;
- Stomedy:FindFirstChild("Cardboard"):Stop();
- end;
- MusicDebounce=false;
- end);
- end;
- end;
- end;
- if not MainTarget and not MusicDebounce then
- Spawn(function()
- MusicDebounce=true;
- repeat Wait(0);if StomedyScript and Stomedy and Stomedy:FindFirstChild("Cardboard")then Stomedy:FindFirstChild("Cardboard").Volume=Stomedy:FindFirstChild("Cardboard").Volume-0.01;else break;end;until Stomedy:FindFirstChild("Cardboard").Volume==0 or Stomedy:FindFirstChild("Cardboard").Volume<0;
- if StomedyScript and Stomedy and Stomedy:FindFirstChild("Cardboard")then
- Stomedy:FindFirstChild("Cardboard").Volume=0;
- Stomedy:FindFirstChild("Cardboard"):Stop();
- end;
- MusicDebounce=false;
- end);
- end;
- if MainTarget~=nil then
- if StomedyScript and Stomedy and StomedyHumanoid and StomedyHumanoid.Health~=0 then
- if MainTarget~=nil and FoundHumanoid~=nil and FoundHumanoid.Health~=0 and(MainTarget.Position-StomedyHumanoidRootPart.Position).magnitude>5 then
- StomedyHumanoid.WalkSpeed=50;
- elseif MainTarget~=nil and FoundHumanoid~=nil and FoundHumanoid.Health~=0 and(MainTarget.Position-StomedyHumanoidRootPart.Position).magnitude<5 then
- StomedyHumanoid.WalkSpeed=10;
- end;
- end;
- if StomedyScript~=nil and Stomedy~=nil and Stomedy:FindFirstChild("Torso")and Stomedy:FindFirstChild("Torso"):FindFirstChild("Neck")then
- local NeckRotation=(Stomedy:FindFirstChild("Torso").Position.Y-MainTarget.Parent:FindFirstChild("Head").Position.Y)/10;
- if NeckRotation>-1.5 and NeckRotation<1.5 then
- if StomedyScript and Stomedy and Stomedy:FindFirstChild("Torso")and Stomedy:FindFirstChild("Torso"):FindFirstChild("Neck")then
- Stomedy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=OriginalC0*CFrame.fromEulerAnglesXYZ(NeckRotation,0,0);
- end;
- end;
- if NeckRotation<-1.5 then
- Stomedy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,-0.993636549,0.112633869,0,0.112633869,0.993636549);
- elseif NeckRotation>1.5 then
- if StomedyScript and Stomedy and Stomedy:FindFirstChild("Torso")and Stomedy:FindFirstChild("Torso"):FindFirstChild("Neck")then
- Stomedy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0.996671617,0.081521146,0,0.081521146,-0.996671617);
- end;
- end;
- end;
- else
- if StomedyScript~=nil and Stomedy~=nil and Stomedy:FindFirstChild("Points")then
- local PointsModel=Stomedy:FindFirstChild("Points");
- if PointsModel~=nil and #PointsModel:GetChildren()~=0 then
- PointsModel:ClearAllChildren();
- end;
- end;
- if StomedyScript~=nil and Stomedy~=nil and Stomedy:FindFirstChild("Torso")and Stomedy:FindFirstChild("Torso"):FindFirstChild("Neck")then
- Stomedy:FindFirstChild("Torso"):FindFirstChild("Neck").C0=CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0);
- end;
- if StomedyScript and Stomedy and StomedyHumanoid then
- StomedyHumanoid.WalkSpeed=12;
- end;
- local SwitchWander=math.random(1,2000);
- if SwitchWander==1 and not DynamicWander then
- DynamicWander=true;
- elseif SwitchWander==1 and DynamicWander then
- DynamicWander=false;
- end;
- local WalkChance=math.random(1,40);
- if WalkChance==1 and StomedyScript and Stomedy and Stomedy:FindFirstChild("Torso")and Stomedy:FindFirstChild("Head")and StomedyHumanoid and StomedyHumanoid.Health>0.001 and not DynamicWander then
- elseif StomedyScript and Stomedy and Stomedy:FindFirstChild("Torso")and Stomedy:FindFirstChild("Head")and StomedyHumanoid and StomedyHumanoid.Health>0.001 and DynamicWander then
- local WanderAngle=(math.random()-0.5)*1;
- local RotatingLookVector=CFrame.Angles(0,WanderAngle,0)*script.Parent.Torso.CFrame.lookVector;
- StomedyHumanoid:MoveTo(Stomedy:FindFirstChild("Torso").Position+6*RotatingLookVector,Stomedy:FindFirstChild("Torso"));
- end;
- end;
- if StomedyScript and Stomedy and StomedyHumanoid then
- StomedyHumanoid.DisplayDistanceType="None";
- StomedyHumanoid.HealthDisplayDistance=0;
- StomedyHumanoid.NameDisplayDistance=0;
- StomedyHumanoid.NameOcclusion="EnemyOcclusion";
- StomedyHumanoid.AutoJumpEnabled=true;
- StomedyHumanoid.AutoRotate=true;
- StomedyHumanoid.MaxHealth=99999e99999;
- StomedyHumanoid.Health=99999e99999;
- StomedyHumanoid.JumpPower=100;
- StomedyHumanoid.MaxSlopeAngle=89.9;
- end;
- if StomedyScript and Stomedy and StomedyHumanoid and not StomedyHumanoid.AutoJumpEnabled then
- StomedyHumanoid.AutoJumpEnabled=true;
- end;
- if StomedyScript and Stomedy and StomedyHumanoid and not StomedyHumanoid.AutoRotate then
- StomedyHumanoid.AutoRotate=true;
- end;
- if StomedyScript and Stomedy and StomedyHumanoid and StomedyHumanoid.PlatformStand then
- StomedyHumanoid.PlatformStand=false;
- end;
- if StomedyScript and Stomedy and StomedyHumanoid and StomedyHumanoid.Sit then
- StomedyHumanoid.Sit=false;
- end;
- end;
- --[[ By: Brutez. ]]--
- end))
- Animation46.Name = "Swing"
- Animation46.Parent = Script45
- Animation46.AnimationId = "rbxassetid://191123156"
- CharacterMesh47.Name = "Roblox 3.0 Right Leg"
- CharacterMesh47.Parent = Model0
- CharacterMesh47.MeshId = 81487710
- CharacterMesh47.BodyPart = Enum.BodyPart.RightLeg
- CharacterMesh48.Name = "Roblox 3.0 torso"
- CharacterMesh48.Parent = Model0
- CharacterMesh48.MeshId = 82907945
- CharacterMesh48.BodyPart = Enum.BodyPart.Torso
- CharacterMesh49.Name = "Roblox 3.0 Left Arm"
- CharacterMesh49.Parent = Model0
- CharacterMesh49.MeshId = 82907977
- CharacterMesh49.BodyPart = Enum.BodyPart.LeftArm
- CharacterMesh50.Name = "Roblox 3.0 Left Leg"
- CharacterMesh50.Parent = Model0
- CharacterMesh50.MeshId = 81487640
- CharacterMesh50.BodyPart = Enum.BodyPart.LeftLeg
- CharacterMesh51.Name = "Roblox 3.0 Right Arm"
- CharacterMesh51.Parent = Model0
- CharacterMesh51.MeshId = 82908019
- CharacterMesh51.BodyPart = Enum.BodyPart.RightArm
- Shirt52.Name = "Shirt"
- Shirt52.Parent = Model0
- Shirt52.ShirtTemplate = "http://www.roblox.com/asset/?id=359526867"
- Pants53.Name = "Pants"
- Pants53.Parent = Model0
- Pants53.PantsTemplate = "http://www.roblox.com/asset/?id=242081979"
- Hat54.Name = "RoboKnitHat"
- Hat54.Parent = Model0
- Hat54.AttachmentPos = Vector3.new(0, 0.200000003, 0)
- Part55.Name = "Handle"
- Part55.Parent = Hat54
- Part55.Rotation = Vector3.new(0, -57.8199997, 0)
- Part55.Velocity = Vector3.new(1.40129846e-45, 0, 1.40129846e-45)
- Part55.CanCollide = false
- Part55.Locked = true
- Part55.FormFactor = Enum.FormFactor.Custom
- Part55.Size = Vector3.new(1.84000015, 1.79000008, 2.03999972)
- Part55.CFrame = CFrame.new(20.9954529, 4.80000925, 7.42480421, 0.53263253, 0, -0.846346557, 0, 1, 0, 0.846346557, 0, 0.53263253)
- Part55.BottomSurface = Enum.SurfaceType.Smooth
- Part55.TopSurface = Enum.SurfaceType.Smooth
- Part55.Position = Vector3.new(20.9954529, 4.80000925, 7.42480421)
- Part55.Orientation = Vector3.new(0, -57.8199997, 0)
- SpecialMesh56.Parent = Part55
- SpecialMesh56.MeshId = "http://www.roblox.com/asset/?id=215693829 "
- SpecialMesh56.TextureId = "http://www.roblox.com/asset/?id=215694384 "
- SpecialMesh56.MeshType = Enum.MeshType.FileMesh
- Script57.Name = "MonsterScript"
- Script57.Parent = Model0
- table.insert(cors,sandbox(Script57,function()
- --[[
- Basic Monster by ArceusInator
- Information:
- Configurations.MaximumDetectionDistance (default 200)
- The monster will not detect players past this point. If you set it to a negative number then the monster will be able to chase from any distance.
- Configurations.CanGiveUp (default true)
- If true, the monster will give up if its target goes past the MaximumDetectionDistance. This is a pretty good idea if you have people teleporting around.
- Configurations.CanRespawn (default true)
- If true, the monster will respawn after it dies
- Configurations.AutoDetectSpawnPoint (default true)
- If true, the spawn point will be auto detected based on where the monster is when it starts
- Configurations.SpawnPoint (default 0,0,0)
- If Settings.AutoDetectSpawnPoint is disabled, this will be set to the monster's initial position. This value will be used when the monster auto respawns to tell it where to spawn next.
- Configurations.FriendlyTeam (default Really black)
- The monster will not attack players on this team
- Mind.CurrentTargetHumanoid (Humanoid objects only)
- You can force the monster to follow a certain humanoid by setting this to that humanoid
- Monster.Respawn (Function)
- Arguments are: Vector3 point
- Info: Respawns the monster at the given point, or at the SpawnPoint setting if none if provided
- Monster.Died (Event)
- Info: Fired when the monster dies
- Monster.Respawned (Event)
- Info: Fired when the monster respawns
- --]]
- local Self = script.Parent
- local Settings = Self:FindFirstChild'Configurations' -- Points to the settings.
- local Mind = Self:FindFirstChild'Mind' -- Points to the monster's mind. You can edit parts of this from other scripts in-game to change the monster's behavior. Advanced users only.
- --
- -- Verify that everything is where it should be
- assert(Self:FindFirstChild'Humanoid' ~= nil, 'Monster does not have a humanoid')
- assert(Settings ~= nil, 'Monster does not have a Configurations object')
- assert(Settings:FindFirstChild'MaximumDetectionDistance' ~= nil and Settings.MaximumDetectionDistance:IsA'NumberValue', 'Monster does not have a MaximumDetectionDistance (NumberValue) setting')
- assert(Settings:FindFirstChild'CanGiveUp' ~= nil and Settings.CanGiveUp:IsA'BoolValue', 'Monster does not have a CanGiveUp (BoolValue) setting')
- assert(Settings:FindFirstChild'CanRespawn' ~= nil and Settings.CanRespawn:IsA'BoolValue', 'Monster does not have a CanRespawn (BoolValue) setting')
- assert(Settings:FindFirstChild'SpawnPoint' ~= nil and Settings.SpawnPoint:IsA'Vector3Value', 'Monster does not have a SpawnPoint (Vector3Value) setting')
- assert(Settings:FindFirstChild'AutoDetectSpawnPoint' ~= nil and Settings.AutoDetectSpawnPoint:IsA'BoolValue', 'Monster does not have a AutoDetectSpawnPoint (BoolValue) setting')
- assert(Settings:FindFirstChild'FriendlyTeam' ~= nil and Settings.FriendlyTeam:IsA'BrickColorValue', 'Monster does not have a FriendlyTeam (BrickColorValue) setting')
- assert(Settings:FindFirstChild'AttackDamage' ~= nil and Settings.AttackDamage:IsA'NumberValue', 'Monster does not have a AttackDamage (NumberValue) setting')
- assert(Settings:FindFirstChild'AttackFrequency' ~= nil and Settings.AttackFrequency:IsA'NumberValue', 'Monster does not have a AttackFrequency (NumberValue) setting')
- assert(Settings:FindFirstChild'AttackRange' ~= nil and Settings.AttackRange:IsA'NumberValue', 'Monster does not have a AttackRange (NumberValue) setting')
- assert(Mind ~= nil, 'Monster does not have a Mind object')
- assert(Mind:FindFirstChild'CurrentTargetHumanoid' ~= nil and Mind.CurrentTargetHumanoid:IsA'ObjectValue', 'Monster does not have a CurrentTargetHumanoid (ObjectValue) mind setting')
- assert(Self:FindFirstChild'Respawn' and Self.Respawn:IsA'BindableFunction', 'Monster does not have a Respawn BindableFunction')
- assert(Self:FindFirstChild'Died' and Self.Died:IsA'BindableEvent', 'Monster does not have a Died BindableEvent')
- assert(Self:FindFirstChild'Respawned' and Self.Died:IsA'BindableEvent', 'Monster does not have a Respawned BindableEvent')
- assert(Self:FindFirstChild'Attacked' and Self.Died:IsA'BindableEvent', 'Monster does not have a Attacked BindableEvent')
- assert(script:FindFirstChild'Attack' and script.Attack:IsA'Animation', 'Monster does not have a MonsterScript.Attack Animation')
- --
- --
- local Info = {
- -- These are constant values. Don't change them unless you know what you're doing.
- -- Services
- Players = Game:GetService 'Players',
- PathfindingService = Game:GetService 'PathfindingService',
- -- Advanced settings
- RecomputePathFrequency = 1, -- The monster will recompute its path this many times per second
- RespawnWaitTime = 5, -- How long to wait before the monster respawns
- JumpCheckFrequency = 1, -- How many times per second it will do a jump check
- }
- local Data = {
- -- These are variable values used internally by the script. Advanced users only.
- LastRecomputePath = 0,
- Recomputing = false, -- Reocmputing occurs async, meaning this script will still run while it's happening. This variable will prevent the script from running two recomputes at once.
- PathCoords = {},
- IsDead = false,
- TimeOfDeath = 0,
- CurrentNode = nil,
- CurrentNodeIndex = 1,
- AutoRecompute = true,
- LastJumpCheck = 0,
- LastAttack = 0,
- BaseMonster = Self:Clone(),
- AttackTrack = nil,
- }
- --
- --
- local Monster = {} -- Create the monster class
- function Monster:GetCFrame()
- -- Returns the CFrame of the monster's humanoidrootpart
- local humanoidRootPart = Self:FindFirstChild('HumanoidRootPart')
- if humanoidRootPart ~= nil and humanoidRootPart:IsA('BasePart') then
- return humanoidRootPart.CFrame
- else
- return CFrame.new()
- end
- end
- function Monster:GetMaximumDetectionDistance()
- -- Returns the maximum detection distance
- local setting = Settings.MaximumDetectionDistance.Value
- if setting < 0 then
- return math.huge
- else
- return setting
- end
- end
- function Monster:SearchForTarget()
- -- Finds the closest player and sets the target
- local players = Info.Players:GetPlayers()
- local closestCharacter, closestCharacterDistance
- for i=1, #players do
- local player = players[i]
- if player.Neutral or player.TeamColor ~= Settings.FriendlyTeam.Value then
- local character = player.Character
- if character ~= nil and character:FindFirstChild('Humanoid') ~= nil and character.Humanoid:IsA('Humanoid') then
- local distance = player:DistanceFromCharacter(Monster:GetCFrame().p)
- if distance < Monster:GetMaximumDetectionDistance() then
- if closestCharacter == nil then
- closestCharacter, closestCharacterDistance = character, distance
- else
- if closestCharacterDistance > distance then
- closestCharacter, closestCharacterDistance = character, distance
- end
- end
- end
- end
- end
- end
- if closestCharacter ~= nil then
- Mind.CurrentTargetHumanoid.Value = closestCharacter.Humanoid
- end
- end
- function Monster:TryRecomputePath()
- if Data.AutoRecompute or tick() - Data.LastRecomputePath > 1/Info.RecomputePathFrequency then
- Monster:RecomputePath()
- end
- end
- function Monster:GetTargetCFrame()
- local targetHumanoid = Mind.CurrentTargetHumanoid.Value
- if Monster:TargetIsValid() then
- return targetHumanoid.Torso.CFrame
- else
- return CFrame.new()
- end
- end
- function Monster:IsAlive()
- return Self.Humanoid.Health > 0 and Self.Humanoid.Torso ~= nil
- end
- function Monster:TargetIsValid()
- local targetHumanoid = Mind.CurrentTargetHumanoid.Value
- if targetHumanoid ~= nil and targetHumanoid:IsA 'Humanoid' and targetHumanoid.Torso ~= nil and targetHumanoid.Torso:IsA 'BasePart' then
- return true
- else
- return false
- end
- end
- function Monster:HasClearLineOfSight()
- -- Going to cast a ray to see if I can just see my target
- local myPos, targetPos = Monster:GetCFrame().p, Monster:GetTargetCFrame().p
- local hit, pos = Workspace:FindPartOnRayWithIgnoreList(
- Ray.new(
- myPos,
- targetPos - myPos
- ),
- {
- Self,
- Mind.CurrentTargetHumanoid.Value.Parent
- }
- )
- if hit == nil then
- return true
- else
- return false
- end
- end
- function Monster:RecomputePath()
- if not Data.Recomputing then
- if Monster:IsAlive() and Monster:TargetIsValid() then
- if Monster:HasClearLineOfSight() then
- Data.AutoRecompute = true
- Data.PathCoords = {
- Monster:GetCFrame().p,
- Monster:GetTargetCFrame().p
- }
- Data.LastRecomputePath = tick()
- Data.CurrentNode = nil
- Data.CurrentNodeIndex = 2 -- Starts chasing the target without evaluating its current position
- else
- -- Do pathfinding since you can't walk straight
- Data.Recomputing = true -- Basically a debounce.
- Data.AutoRecompute = false
- local path = Info.PathfindingService:ComputeSmoothPathAsync(
- Monster:GetCFrame().p,
- Monster:GetTargetCFrame().p,
- 500
- )
- Data.PathCoords = path:GetPointCoordinates()
- Data.Recomputing = false
- Data.LastRecomputePath = tick()
- Data.CurrentNode = nil
- Data.CurrentNodeIndex = 1
- end
- end
- end
- end
- function Monster:Update()
- Monster:ReevaluateTarget()
- Monster:SearchForTarget()
- Monster:TryRecomputePath()
- Monster:TravelPath()
- end
- function Monster:TravelPath()
- local closest, closestDistance, closestIndex
- local myPosition = Monster:GetCFrame().p
- local skipCurrentNode = Data.CurrentNode ~= nil and (Data.CurrentNode - myPosition).magnitude < 3
- for i=Data.CurrentNodeIndex, #Data.PathCoords do
- local coord = Data.PathCoords[i]
- if not (skipCurrentNode and coord == Data.CurrentNode) then
- local distance = (coord - myPosition).magnitude
- if closest == nil then
- closest, closestDistance, closestIndex = coord, distance, i
- else
- if distance < closestDistance then
- closest, closestDistance, closestIndex = coord, distance, i
- else
- break
- end
- end
- end
- end
- --
- if closest ~= nil then
- Data.CurrentNode = closest
- Data.CurrentNodeIndex = closestIndex
- local humanoid = Self:FindFirstChild 'Humanoid'
- if humanoid ~= nil and humanoid:IsA'Humanoid' then
- humanoid:MoveTo(closest)
- end
- if Monster:IsAlive() and Monster:TargetIsValid() then
- Monster:TryJumpCheck()
- Monster:TryAttack()
- end
- if closestIndex == #Data.PathCoords then
- -- Reached the end of the path, force a new check
- Data.AutoRecompute = true
- end
- end
- end
- function Monster:TryJumpCheck()
- if tick() - Data.LastJumpCheck > 1/Info.JumpCheckFrequency then
- Monster:JumpCheck()
- end
- end
- function Monster:TryAttack()
- if tick() - Data.LastAttack > 1/Settings.AttackFrequency.Value then
- Monster:Attack()
- end
- end
- function Monster:Attack()
- local myPos, targetPos = Monster:GetCFrame().p, Monster:GetTargetCFrame().p
- if (myPos - targetPos).magnitude <= Settings.AttackRange.Value then
- Mind.CurrentTargetHumanoid.Value:TakeDamage(Settings.AttackDamage.Value)
- Data.LastAttack = tick()
- Data.AttackTrack:Play()
- end
- end
- function Monster:JumpCheck()
- -- Do a raycast to check if we need to jump
- local myCFrame = Monster:GetCFrame()
- local checkVector = (Monster:GetTargetCFrame().p - myCFrame.p).unit*2
- local hit, pos = Workspace:FindPartOnRay(
- Ray.new(
- myCFrame.p + Vector3.new(0, -2.4, 0),
- checkVector
- ),
- Self
- )
- if hit ~= nil and not hit:IsDescendantOf(Mind.CurrentTargetHumanoid.Value.Parent) then
- -- Do a slope check to make sure we're not walking up a ramp
- local hit2, pos2 = Workspace:FindPartOnRay(
- Ray.new(
- myCFrame.p + Vector3.new(0, -2.3, 0),
- checkVector
- ),
- Self
- )
- if hit2 == hit then
- if ((pos2 - pos)*Vector3.new(1,0,1)).magnitude < 0.05 then -- Will pass for any ramp with <2 slope
- Self.Humanoid.Jump = true
- end
- end
- end
- Data.LastJumpCheck = tick()
- end
- function Monster:Connect()
- Mind.CurrentTargetHumanoid.Changed:connect(function(humanoid)
- if humanoid ~= nil then
- assert(humanoid:IsA'Humanoid', 'Monster target must be a humanoid')
- Monster:RecomputePath()
- end
- end)
- Self.Respawn.OnInvoke = function(point)
- Monster:Respawn(point)
- end
- end
- function Monster:Initialize()
- Monster:Connect()
- if Settings.AutoDetectSpawnPoint.Value then
- Settings.SpawnPoint.Value = Monster:GetCFrame().p
- end
- end
- function Monster:Respawn(point)
- local point = point or Settings.SpawnPoint.Value
- for index, obj in next, Data.BaseMonster:Clone():GetChildren() do
- if obj.Name == 'Configurations' or obj.Name == 'Mind' or obj.Name == 'Respawned' or obj.Name == 'Died' or obj.Name == 'MonsterScript' or obj.Name == 'Respawn' then
- obj:Destroy()
- else
- Self[obj.Name]:Destroy()
- obj.Parent = Self
- end
- end
- Monster:InitializeUnique()
- Self.Parent = Workspace
- Self.HumanoidRootPart.CFrame = CFrame.new(point)
- Settings.SpawnPoint.Value = point
- Self.Respawned:Fire()
- end
- function Monster:InitializeUnique()
- Data.AttackTrack = Self.Humanoid:LoadAnimation(script.Attack)
- end
- function Monster:ReevaluateTarget()
- local currentTarget = Mind.CurrentTargetHumanoid.Value
- if currentTarget ~= nil and currentTarget:IsA'Humanoid' then
- local character = currentTarget.Parent
- if character ~= nil then
- local player = Info.Players:GetPlayerFromCharacter(character)
- if player ~= nil then
- if not player.Neutral and player.TeamColor == Settings.FriendlyTeam.Value then
- Mind.CurrentTargetHumanoid.Value = nil
- end
- end
- end
- if currentTarget == Mind.CurrentTargetHumanoid.Value then
- local torso = currentTarget.Torso
- if torso ~= nil and torso:IsA 'BasePart' then
- if Settings.CanGiveUp.Value and (torso.Position - Monster:GetCFrame().p).magnitude > Monster:GetMaximumDetectionDistance() then
- Mind.CurrentTargetHumanoid.Value = nil
- end
- end
- end
- end
- end
- --
- --
- Monster:Initialize()
- Monster:InitializeUnique()
- while true do
- if not Monster:IsAlive() then
- if Data.IsDead == false then
- Data.IsDead = true
- Data.TimeOfDeath = tick()
- Self.Died:Fire()
- end
- if Data.IsDead == true then
- if tick()-Data.TimeOfDeath > Info.RespawnWaitTime then
- Monster:Respawn()
- end
- end
- end
- if Monster:IsAlive() then
- Monster:Update()
- end
- wait()
- end
- end))
- Animation58.Name = "Attack"
- Animation58.Parent = Script57
- Animation58.AnimationId = "rbxassetid://0"
- BindableFunction59.Name = "Respawn"
- BindableFunction59.Parent = Model0
- BindableEvent60.Name = "Attacked"
- BindableEvent60.Parent = Model0
- BindableEvent61.Name = "Died"
- BindableEvent61.Parent = Model0
- BindableEvent62.Name = "Respawned"
- BindableEvent62.Parent = Model0
- Configuration63.Name = "Mind"
- Configuration63.Parent = Model0
- ObjectValue64.Name = "CurrentTargetHumanoid"
- ObjectValue64.Parent = Configuration63
- Configuration65.Name = "Configurations"
- Configuration65.Parent = Model0
- NumberValue66.Name = "MaximumDetectionDistance"
- NumberValue66.Parent = Configuration65
- NumberValue66.Value = 200
- BoolValue67.Name = "CanGiveUp"
- BoolValue67.Parent = Configuration65
- BoolValue67.Value = true
- BoolValue68.Name = "CanRespawn"
- BoolValue68.Parent = Configuration65
- BoolValue68.Value = true
- Vector3Value69.Name = "SpawnPoint"
- Vector3Value69.Parent = Configuration65
- Vector3Value69.Value = Vector3.new(24.2997856, 5.00000095, -33.0201225)
- BoolValue70.Name = "AutoDetectSpawnPoint"
- BoolValue70.Parent = Configuration65
- BoolValue70.Value = true
- BrickColorValue71.Name = "FriendlyTeam"
- BrickColorValue71.Parent = Configuration65
- BrickColorValue71.Value = BrickColor.new("Really black")
- NumberValue72.Name = "AttackDamage"
- NumberValue72.Parent = Configuration65
- NumberValue73.Name = "AttackFrequency"
- NumberValue73.Parent = Configuration65
- NumberValue73.Value = 2
- NumberValue74.Name = "AttackRange"
- NumberValue74.Parent = Configuration65
- NumberValue74.Value = 3
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = workspace
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement