Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code by Mokiros")
- local rp = RealPlayer
- script.Parent = rp.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent then
- for _,f in pairs(t.Functions) do
- f(...)
- end
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=rp then return end
- m.Target = io.Target
- m.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return m:TrigEvent(b and "Button2Down" or "Button2Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local Mouse = Player:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local _rg = game
- --Metatable for fake service
- local fsmt = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
- return setmetatable(t,fsmt)
- end
- --Fake game object
- local g = {
- GetService = function(self,s)
- return rawget(self,s) or _rg:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- FakeService(g,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- new = game.Players.LocalPlayer
- born = new.Character
- function splatterdecal(part,decal)
- local numberat = 0
- a = 0
- a01 = "Front"
- a02 = "Bottom"
- a03 = "Left"
- a04 = "Right"
- a05 = "Top"
- a06 = "Bottom"
- for i = 1,6 do
- okayman = Instance.new("Decal",part)
- okayman.Texture = decal
- okayman.Face = a..numberat
- print(a..numberat)
- numberat = numberat + 1
- end
- end
- mas = born.Head
- mas:ClearAllChildren()
- for i,v in pairs(born:GetChildren()) do
- if v.ClassName == "Hat" or v.ClassName == "Accessory" then
- v:remove()
- end
- end
- for i,v in pairs(born:GetChildren()) do
- if v.ClassName == "CharacterMesh" then
- v:remove()
- end
- end
- function lerp(weld,startpos,endpos,amntime,longatend)
- local waited = 0
- for i=1,amntime*100 do
- if longatend == true then
- startpos = weld.C0
- end
- weld.C0 = startpos:lerp(endpos,i/(amntime*100))
- wait(0.01)
- waited=waited+0.01
- end
- end
- function toggletransparency1(part)
- if part then
- for i,v in pairs(part:GetChildren()) do
- if v.ClassName == "Texture" or v.ClassName == "Decal" then
- v.Transparency = 1
- end
- end
- part.Transparency = 1
- end
- end
- function toggletransparency0(part)
- if part then
- for i,v in pairs(part:GetChildren()) do
- if v.ClassName == "Texture" or v.ClassName == "Decal" then
- v.Transparency = 0
- end
- end
- part.Transparency = 0
- end
- end
- headswinging = false
- function katanaswing()
- if born then
- headbutting = true
- toggletransparency1(born.Torso)
- toggletransparency1(born.Head)
- toggletransparency0(head)
- toggletransparency0(torso)
- lerp(root,root.C0,CFrame.new(0, -1.5, 0) * CFrame.Angles(math.rad(100),math.rad(0),0),0.08)
- wait()
- wait()
- lerp(root,root.C0,CFrame.new(0, -1.5, 0) * CFrame.Angles(-math.rad(50),math.rad(0),0),0.08)
- headswinging = true
- lerp(root,root.C0,CFrame.new(0,-1,0),0.08)
- wait()
- toggletransparency0(born.Torso)
- toggletransparency0(born.Head)
- toggletransparency1(head)
- toggletransparency1(torso)
- headbutting = false
- headswinging = false
- end
- end
- SpecialMesh0 = Instance.new("SpecialMesh")
- SpecialMesh0.Parent = mas
- SpecialMesh0.MeshType = Enum.MeshType.Head
- SpecialMesh0.Scale = Vector3.new(1.25, 1.25, 1.25)
- Decal0 = Instance.new("Decal")
- Decal1 = Instance.new("Decal")
- Decal0.Parent = mas
- Decal0.Texture = "http://www.roblox.com/asset/?id=1354636022"
- Decal1.Parent = mas
- Decal1.Texture = "http://www.roblox.com/asset/?id=1354589055"
- Decal1.Face = Enum.NormalId.Right
- for i,v in pairs(born:GetChildren()) do
- if v.ClassName == "Part" and v.Name ~= "Head" and v.Name ~= "HumanoidRootPart" and v.Name ~= "Left Arm" and v.Name ~= "Right Arm" then
- splatterdecal(v,"http://www.roblox.com/asset/?id=1354589055")
- end
- end
- born["Left Arm"].Transparency = 1
- born["Right Arm"].Transparency = 1
- mouse = new:GetMouse()
- Sound0 = Instance.new("Sound")
- Sound0.Name = "runboi"
- Sound0.Parent = born.Head
- Sound0.Pitch = 2
- Sound0.PlaybackSpeed = 2
- Sound0.SoundId = "rbxassetid://1679435417"
- headbutting = false
- mouse.Button1Down:Connect(function()
- if headbutting == false then
- katanaswing()
- end
- end)
- anim = Instance.new("Animation",born)
- anim.AnimationId = "http://www.roblox.com/asset/?id=252557606"
- anim.Name = "RunAnim"
- NLS([[
- born = game.Players.LocalPlayer.Character
- ahahaha = born.Humanoid:LoadAnimation(born.RunAnim)
- local UserInputService = game:GetService("UserInputService")
- UserInputService.InputBegan:Connect(function(key)
- if key.KeyCode == Enum.KeyCode.LeftShift then
- born.Humanoid.WalkSpeed = 45
- ahahaha:Play()
- end
- end)
- UserInputService.InputEnded:Connect(function(key)
- if key.KeyCode == Enum.KeyCode.LeftShift then
- born.Humanoid.WalkSpeed = 16
- ahahaha:Stop()
- end
- end)
- ]],born)
- mouse.KeyDown:Connect(function(key)
- if key == "e" then
- Sound0:Play()
- end
- end)
- if born.Animate then
- born.Animate.run.RunAnim.AnimationId = "http://www.roblox.com/asset/?id=252557606"
- end
- coroutine.resume(coroutine.create(function()
- local Figure = born
- local Torso = Figure:WaitForChild("Torso")
- local RightShoulder = Torso:WaitForChild("Right Shoulder")
- local LeftShoulder = Torso:WaitForChild("Left Shoulder")
- local RightHip = Torso:WaitForChild("Right Hip")
- local LeftHip = Torso:WaitForChild("Left Hip")
- local Neck = Torso:WaitForChild("Neck")
- local Humanoid = Figure:WaitForChild("Humanoid")
- 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 = 10 }
- },
- 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)
- currentAnimTrack.Priority = Enum.AnimationPriority.Core
- -- 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, priority)
- 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)
- if priority then
- toolAnimTrack.Priority = priority
- end
- -- 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
- playAnimation("walk", 0.1, Humanoid)
- if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=252557606" then
- setAnimationSpeed(speed / 14.5)
- end
- pose = "Running"
- else
- if emoteNames[currentAnim] == nil then
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- end
- 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, Enum.AnimationPriority.Idle)
- return
- end
- if (toolAnim == "Slash") then
- playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
- return
- end
- if (toolAnim == "Lunge") then
- playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
- 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
- playAnimation("walk", 0.1, Humanoid)
- elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
- -- print("Wha " .. pose)
- 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)
- -- setup emote chat hook
- --game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
- -- local emote = ""
- -- if msg == "/e dance" then
- -- emote = dances[math.random(1, #dances)]
- -- elseif (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
- --
- --end)
- -- main program
- -- initialize to idle
- playAnimation("idle", 0.1, Humanoid)
- pose = "Standing"
- while Figure.Parent ~= nil do
- local _, time = wait(0.1)
- move(time)
- end
- end))
- --[[
- born.Archivable = true
- fakebody = born:Clone()
- fakebody.Parent = born
- for i,v in pairs(fakebody:GetChildren()) do
- if v.ClassName == "Part" and v.Name ~= "Head" and v.Name ~= "Torso" then
- v:remove()
- end
- end
- fakebodyweld = Instance.new("Weld",fakebody.Torso)
- fakebodyweld.Part0 = born.Torso
- fakebodyweld.Part1 = fakebody.Torso
- fakebodyweld.C0 = CFrame.new(0,-1,0)
- fakebodyweld.C1 = CFrame.new(0,-1,0)
- --]]
- fakebody = Instance.new("Model",born)
- fakebody.Name = born.Name
- torso = Instance.new("Part",fakebody)
- head = Instance.new("Part",fakebody)
- head.Name = "Head"
- torso.Name = "Torso"
- torso.Size = Vector3.new(2, 2, 1)
- head.Size = Vector3.new(2, 1, 1)
- Instance.new("Humanoid",fakebody)
- neek = born.Torso.Neck:Clone()
- neek.Parent = torso
- neek.Part0 = torso
- neek.Part1 = head
- neek.C0 = born.Torso.Neck.C0
- neek.C1 = born.Torso.Neck.C1
- fakebody.Humanoid.PlatformStand = true
- for i,v in pairs(born:GetChildren()) do
- if v.ClassName == "Part" and v.Name == "Head" or v.Name == "Torso" then
- really = v
- for i,v in pairs(v:GetChildren()) do
- if v.ClassName ~= "Motor6D" then
- d = v:Clone()
- d.Parent = fakebody[really.Name]
- end
- end
- end
- end
- fakebodyweld = Instance.new("Weld",fakebody.Torso)
- fakebodyweld.Part0 = born.Torso
- fakebodyweld.Part1 = fakebody.Torso
- fakebodyweld.C0 = CFrame.new(0,-1,0)
- fakebodyweld.C1 = CFrame.new(0,-1,0)
- root = fakebodyweld
- local f = fakebodyweld.C0
- toggletransparency1(head)
- toggletransparency1(torso)
- head.Touched:Connect(function(hit)
- if hit.Parent:FindFirstChildOfClass("Humanoid") and not hit.Parent:FindFirstChild("DEADMIDGET") and headswinging == true then
- coroutine.resume(coroutine.create(function()
- target = hit.Parent
- for i,v in pairs(target:GetChildren()) do
- if v.ClassName == "Script" then
- v:remove()
- end
- end
- target.Humanoid.BreakJointsOnDeath = false
- target.Humanoid.Health = 0
- target.Archivable = true
- ragdoll = target:Clone()
- Humanoid = ragdoll.Humanoid
- player = target
- --[[
- if Humanoid.RigType == Enum.HumanoidRigType.R15 then
- player.Character.LeftLowerArm:remove()
- player.Character.RightLowerArm:remove()
- player.Character.LeftUpperArm:remove()
- player.Character.RightUpperArm:remove()
- player.Character.LeftLowerLeg:remove()
- player.Character.LeftUpperLeg:remove()
- player.Character.RightLowerLeg:remove()
- player.Character.RightUpperLeg:remove()
- player.Character.LowerTorso:remove()
- else
- player.Character["Right Arm"]:remove()
- player.Character["Left Arm"]:remove()
- player.Character["Left Leg"]:remove()
- player.Character["Right Leg"]:remove()
- end
- for i,v in pairs(target:GetChildren()) do
- if v.Name == "Head" or v.Name == "Torso" or v.Name == "UpperTorso" then
- weldo = Instance.new("Weld",v)
- weldo.Part0 = ragdoll[v.Name]
- weldo.Part1 = v
- end
- end
- --]]
- target.Humanoid.Name = "DEADMIDGET"
- coroutine.resume(coroutine.create(function()
- if target:FindFirstChild("UpperTorso") then
- player.LeftLowerArm:remove()
- player.RightLowerArm:remove()
- player.LeftUpperArm:remove()
- player.RightUpperArm:remove()
- player.LeftLowerLeg:remove()
- player.LeftUpperLeg:remove()
- player.RightLowerLeg:remove()
- player.RightUpperLeg:remove()
- player.LowerTorso:remove()
- end
- end))
- coroutine.resume(coroutine.create(function()
- if target:FindFirstChild("Torso") then
- player["Right Arm"]:remove()
- player["Left Arm"]:remove()
- player["Left Leg"]:remove()
- player["Right Leg"]:remove()
- for i,v in pairs(player:GetChildren()) do
- if v.Name == "Head" or v.Name == "Torso" or v.Name == "UpperTorso" or v.Name == "HumanoidRootPart" then
- weldo = Instance.new("Weld",v)
- weldo.Part0 = ragdoll[v.Name]
- weldo.Part1 = v
- end
- end
- end
- end))
- coroutine.resume(coroutine.create(function()
- wait(math.random(1,3))
- local aidsificating = Humanoid.Parent
- local thang = "Torso"
- if aidsificating:FindFirstChild('UpperTorso') then
- thang = "UpperTorso"
- end
- end))
- ragdoll.Parent = workspace
- for i,v in pairs(target:GetChildren()) do
- if v.ClassName == "Script" then
- v:Destroy()
- end
- end
- target.Parent = ragdoll
- ragdoll.Name = ""
- target:FindFirstChildOfClass("Humanoid").PlatformStand = true
- target:FindFirstChildOfClass("Humanoid").BreakJointsOnDeath = false
- coroutine.resume(coroutine.create(function()
- while wait() do
- --target:FindFirstChildOfClass("Humanoid").Health = target:FindFirstChildOfClass("Humanoid").Health - 0.4
- end
- end))
- target:FindFirstChildOfClass("Humanoid").Died:Connect(function()
- ragdoll.Name = target.Name
- end)
- if Humanoid.RigType == Enum.HumanoidRigType.R15 then
- ragdoll.Humanoid.BreakJointsOnDeath=false
- ragdoll.Humanoid.Name = "DEADMIDGET"
- ragdoll:FindFirstChildOfClass("Humanoid").PlatformStand = true
- local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper)
- local connection = Instance.new('BallSocketConstraint', limb)
- connection.LimitsEnabled = true
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.TwistLimitsEnabled = true
- connection.TwistLowerAngle = twistlower
- connection.TwistUpperAngle = twistupper
- local limbcollider = Instance.new("Part", limb)
- limbcollider.Size = Vector3.new(0.1,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider:BreakJoints()
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = limb
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
- end
- local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper)
- local connection = Instance.new('HingeConstraint', limb)
- connection.LimitsEnabled = true
- connection.Attachment0 = attachementone
- connection.Attachment1 = attachmenttwo
- connection.LimitsEnabled = true
- connection.LowerAngle = lower
- connection.UpperAngle = upper
- local limbcollider = Instance.new("Part", limb)
- limbcollider.Size = Vector3.new(0.1,1,1)
- limbcollider.Shape = "Cylinder"
- limbcollider.Transparency = 1
- limbcollider:BreakJoints()
- local limbcolliderweld = Instance.new("Weld", limbcollider)
- limbcolliderweld.Part0 = limb
- limbcolliderweld.Part1 = limbcollider
- limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
- end
- local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head)
- HeadAttachment.Position = Vector3.new(0, -0.5, 0)
- if ragdoll.UpperTorso:findFirstChild("NeckAttachment") then
- makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50)
- end
- function bleed(frick,OwO)
- while frick.Parent ~= nil and frick.Parent.Parent ~= nil do
- local reeee = coroutine.wrap(function()
- local thing = Instance.new('Part',workspace)
- thing.Size = Vector3.new(0.2,0.2,0.2)
- thing.CFrame = frick.CFrame
- thing.Transparency = 1
- thing.BrickColor = BrickColor.new('Maroon')
- thing.Material = Enum.Material.SmoothPlastic
- thing.Name = "Blood"
- thing.CanCollide =false
- thing:BreakJoints()
- local rawrxd = Instance.new('BodyForce',thing)
- rawrxd.Force = frick.CFrame.upVector*(math.random()*2)+Vector3.new(math.random(-5, 5)/10,1.5,0)
- local coru = coroutine.wrap(function()
- wait(0.01)
- rawrxd:Destroy()
- end)
- coru()
- local ree = Instance.new('ParticleEmitter',thing)
- if OwO ~= true then
- ree.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.fromRGB(117, 0, 0)),ColorSequenceKeypoint.new(1,Color3.fromRGB(117, 0, 0))})
- else
- ree.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.fromRGB(117, 0, 0)),ColorSequenceKeypoint.new(1,Color3.fromRGB(117, 0, 0))})
- end
- ree.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0.1),NumberSequenceKeypoint.new(1,0.1)})
- ree.Texture = 'rbxassetid://867743272'
- ree.Lifetime = NumberRange.new(0.4)
- ree.Rate = 50
- ree.LockedToPart = true
- ree.Speed = NumberRange.new(0, 2)
- thing.Touched:connect(function(tou)
- if tou.Parent and tou.Parent:IsA('Tool') == false and tou.Parent.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.Name ~= "Blood" and tou.Parent.Name ~= "Projectile" and tou.Parent.Name ~= "big ass knife" and tou.Parent.ClassName ~= "Accessory" and tou.Parent.Name ~= "bitch ass knife" and tou.Parent.Name ~= 'handle' and tou.Name ~= "blade" and tou.Name ~= 'handle' and tou.Name ~= "Projectile" and tou.Parent.Name ~= "Projectile" then
- local pos = Vector3.new(thing.Position.X,(tou.Position.Y+(tou.Size.Y/2))+0.02,thing.Position.Z)
- local Point1 = pos-Vector3.new(0.01,0.01,0.01)
- local Point2 = pos+Vector3.new(0.01,0.01,0.01)
- local Region = Region3.new(Point1,Point2)
- for _,Part in pairs(game.Workspace:FindPartsInRegion3(Region,nil,math.huge)) do
- if Part.Name == "BloodPuddle" then
- tou = Part
- end
- end
- thing:Destroy()
- if tou.Name == "BloodPuddle" then
- if tou.Size.X < 1 then
- pcall(function()
- tou.Sound:Play()
- end)
- end
- local reee = tou.CFrame
- if tou.Transparency > -0.2 then
- tou.Transparency = tou.Transparency -0.1
- end
- if tou.Size.X < 3 then
- tou.Size = tou.Size+Vector3.new(0.1,0,0.1)
- tou.CFrame = reee
- end
- elseif tou.CanCollide == true then
- local bloodlol = Instance.new('Part',workspace)
- local sound = Instance.new('Sound',bloodlol)
- sound.SoundId = 'rbxassetid://685857471'
- sound.Volume = 0.025
- sound:Play()
- bloodlol.Size=Vector3.new(0.2,0.2,0.2)
- bloodlol.Name = "BloodPuddle"
- bloodlol.Anchored = true
- bloodlol.CanCollide = false
- bloodlol.Material = Enum.Material.SmoothPlastic
- if OwO ~= true then
- bloodlol.Color = Color3.fromRGB(117, 0, 0)
- else
- bloodlol.Color = Color3.fromRGB(117, 0, 0)
- end
- local cyl = Instance.new('CylinderMesh',bloodlol)
- cyl.Scale = Vector3.new(1,0.1,1)
- bloodlol.CFrame = CFrame.new(pos)
- coroutine.resume(coroutine.create(function()
- local tou = bloodlol
- local reee = tou.CFrame
- while wait() do
- if tou.Size.X < 5 then
- tou.Size = tou.Size+Vector3.new(0.005,0,0.005)
- tou.CFrame = reee
- end
- end
- end))
- local coru=coroutine.wrap(function()
- while bloodlol.Parent ~= nil do
- if bloodlol.Transparency < 1 then
- bloodlol.Transparency = bloodlol.Transparency+0.05
- else
- bloodlol:Destroy()
- end
- wait(0.1)
- end
- end)
- end
- end
- end)
- local coru = coroutine.wrap(function()
- wait(1)
- thing:Destroy()
- end)
- coru()
- end)
- reeee()
- wait()
- end
- end
- local aidsificating = Humanoid.Parent
- local thang = "Torso"
- if aidsificating:FindFirstChild('UpperTorso') then
- thang = "UpperTorso"
- end
- makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50)
- makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180)
- makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60)
- makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20)
- --
- makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180)
- makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60)
- makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20)
- --
- makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80)
- makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60)
- makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20)
- --
- makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80)
- makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60)
- makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20)
- for i,v in pairs(Humanoid.Parent:GetChildren()) do
- if v.ClassName == "Accessory" then
- local attachment1 = v.Handle:findFirstChildOfClass("Attachment")
- if attachment1 then
- for q,w in pairs(Humanoid.Parent:GetChildren()) do
- if w.ClassName == "Part" then
- local attachment2 = w:findFirstChild(attachment1.Name)
- if attachment2 then
- local hinge = Instance.new("HingeConstraint", v.Handle)
- hinge.Attachment0 = attachment1
- hinge.Attachment1 = attachment2
- hinge.LimitsEnabled = true
- hinge.LowerAngle = 0
- hinge.UpperAngle = 0
- end
- end
- end
- end
- end
- end
- for i,v in pairs(ragdoll:GetChildren()) do
- for q,w in pairs(v:GetChildren()) do
- if w.ClassName == "Motor6D"--[[ and w.Name ~= "Neck"--]] and w.Name ~= "ouch_weld" then
- w:destroy()
- end
- end
- end
- if ragdoll:findFirstChild("HumanoidRootPart") then
- ragdoll.HumanoidRootPart:destroy()
- end
- if ragdoll:findFirstChildOfClass("Humanoid") then
- ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true
- end
- for i,v in pairs(player:GetChildren()) do
- if v.Name == "Head" or v.Name == "Torso" or v.Name == "UpperTorso" then
- weldo = Instance.new("Weld",v)
- weldo.Part0 = ragdoll[v.Name]
- weldo.Part1 = v
- end
- end
- else
- local c = ragdoll
- function bleed(frick,OwO)
- while frick.Parent ~= nil and frick.Parent.Parent ~= nil do
- local reeee = coroutine.wrap(function()
- local thing = Instance.new('Part',workspace)
- thing.Size = Vector3.new(0.2,0.2,0.2)
- thing.CFrame = frick.CFrame
- thing.Transparency = 1
- thing.BrickColor = BrickColor.new('Maroon')
- thing.Material = Enum.Material.SmoothPlastic
- thing.Name = "Blood"
- thing.CanCollide =false
- thing:BreakJoints()
- local rawrxd = Instance.new('BodyForce',thing)
- rawrxd.Force = frick.CFrame.upVector*(math.random()*2)+Vector3.new(math.random(-5, 5)/10,1.5,0)
- local coru = coroutine.wrap(function()
- wait(0.01)
- rawrxd:Destroy()
- end)
- coru()
- local ree = Instance.new('ParticleEmitter',thing)
- if OwO ~= true then
- ree.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.fromRGB(117, 0, 0)),ColorSequenceKeypoint.new(1,Color3.fromRGB(117, 0, 0))})
- else
- ree.Color = ColorSequence.new({ColorSequenceKeypoint.new(0,Color3.fromRGB(117, 0, 0)),ColorSequenceKeypoint.new(1,Color3.fromRGB(117, 0, 0))})
- end
- ree.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0.1),NumberSequenceKeypoint.new(1,0.1)})
- ree.Texture = 'rbxassetid://867743272'
- ree.Lifetime = NumberRange.new(0.4)
- ree.Rate = 50
- ree.LockedToPart = true
- ree.Speed = NumberRange.new(0, 2)
- thing.Touched:connect(function(tou)
- if tou.Parent and tou.Parent:IsA('Tool') == false and tou.Parent.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.Parent:FindFirstChildOfClass('Humanoid') == nil and tou.Name ~= "Blood" and tou.Parent.Name ~= "Projectile" and tou.Parent.Name ~= "big ass knife" and tou.Parent.ClassName ~= "Accessory" and tou.Parent.Name ~= "bitch ass knife" and tou.Parent.Name ~= 'handle' and tou.Name ~= "blade" and tou.Name ~= 'handle' and tou.Name ~= "Projectile" and tou.Parent.Name ~= "Projectile" then
- local pos = Vector3.new(thing.Position.X,(tou.Position.Y+(tou.Size.Y/2))+0.02,thing.Position.Z)
- local Point1 = pos-Vector3.new(0.01,0.01,0.01)
- local Point2 = pos+Vector3.new(0.01,0.01,0.01)
- local Region = Region3.new(Point1,Point2)
- for _,Part in pairs(game.Workspace:FindPartsInRegion3(Region,nil,math.huge)) do
- if Part.Name == "BloodPuddle" then
- tou = Part
- end
- end
- thing:Destroy()
- if tou.Name == "BloodPuddle" then
- if tou.Size.X < 1 then
- pcall(function()
- tou.Sound:Play()
- end)
- end
- local reee = tou.CFrame
- if tou.Transparency > -0.2 then
- tou.Transparency = tou.Transparency -0.1
- end
- if tou.Size.X < 3 then
- tou.Size = tou.Size+Vector3.new(0.1,0,0.1)
- tou.CFrame = reee
- end
- elseif tou.CanCollide == true then
- local bloodlol = Instance.new('Part',workspace)
- local sound = Instance.new('Sound',bloodlol)
- sound.SoundId = 'rbxassetid://685857471'
- sound.Volume = 0.025
- sound:Play()
- bloodlol.Size=Vector3.new(0.2,0.2,0.2)
- bloodlol.Name = "BloodPuddle"
- bloodlol.Anchored = true
- bloodlol.CanCollide = false
- bloodlol.Material = Enum.Material.SmoothPlastic
- if OwO ~= true then
- bloodlol.Color = Color3.fromRGB(117, 0, 0)
- else
- bloodlol.Color = Color3.fromRGB(117, 0, 0)
- end
- local cyl = Instance.new('CylinderMesh',bloodlol)
- cyl.Scale = Vector3.new(1,0.1,1)
- bloodlol.CFrame = CFrame.new(pos)
- coroutine.resume(coroutine.create(function()
- local tou = bloodlol
- local reee = tou.CFrame
- while wait() do
- if tou.Size.X < 5 then
- tou.Size = tou.Size+Vector3.new(0.005,0,0.005)
- tou.CFrame = reee
- end
- end
- end))
- local coru=coroutine.wrap(function()
- while bloodlol.Parent ~= nil do
- if bloodlol.Transparency < 1 then
- bloodlol.Transparency = bloodlol.Transparency+0.05
- else
- bloodlol:Destroy()
- end
- wait(0.1)
- end
- end)
- end
- end
- end)
- local coru = coroutine.wrap(function()
- wait(1)
- thing:Destroy()
- end)
- coru()
- end)
- reeee()
- wait()
- end
- end
- local aidsificating = Humanoid.Parent
- local thang = "Torso"
- if aidsificating:FindFirstChild('UpperTorso') then
- thang = "UpperTorso"
- end
- ragdoll.Humanoid.BreakJointsOnDeath=false
- ragdoll.Humanoid.Name = "DEADMIDGET"
- ragdoll:FindFirstChildOfClass("Humanoid").PlatformStand = true
- leftleg = Instance.new("Part",c["Left Leg"])
- leftleg.Shape = "Cylinder"
- leftleg.Transparency = 1
- leftleg.Size=Vector3.new(1.4,1,1)
- leftlegweld = Instance.new("Weld",leftleg)
- leftlegweld.Part0=ragdoll["Left Leg"]
- leftlegweld.Part1=leftleg
- leftlegweld.C0=CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- rightleg = Instance.new("Part",ragdoll["Right Leg"])
- rightleg.Shape = "Cylinder"
- rightleg.Size=Vector3.new(1.4,1,1)
- rightleg.Transparency = 1
- rightlegweld = Instance.new("Weld",leftleg)
- rightlegweld.C0=CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- rightlegweld.Part0=c["Right Leg"]
- rightlegweld.Part1=rightleg
- rightarm = Instance.new("Part",c["Right Arm"])
- rightarm.Shape = "Cylinder"
- rightarm.Size=Vector3.new(1.4,1,1)
- rightarm.Transparency = 1
- rightarmweld = Instance.new("Weld",rightarm)
- rightarmweld.C0=CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- rightarmweld.Part0=c["Right Arm"]
- rightarmweld.Part1=rightarm
- leftarm = Instance.new("Part",c["Left Arm"])
- leftarm.Shape = "Cylinder"
- leftarm.Size=Vector3.new(1.4,1,1)
- leftarm.Transparency = 1
- leftarmweld = Instance.new("Weld",leftarm)
- leftarmweld.C0=CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
- leftarmweld.Part0=c["Left Arm"]
- leftarmweld.Part1=leftarm
- head = Instance.new("Part",c.Head)
- head.Size=Vector3.new(1.4,1,1)
- head.Transparency = 1
- headweld = Instance.new("Weld",head)
- headweld.Part0=c.Head
- headweld.Part1=head
- player = ragdoll
- local RealTorso = player.Torso
- local RealHead = player.Head
- local RealLeftleg = player["Left Leg"]
- local RealRightleg = player["Right Leg"]
- local RealLeftArm = player["Left Arm"]
- local RealRightArm = player["Right Arm"]
- local rightarmglue = Instance.new("Glue", RealTorso)
- rightarmglue.Part0 = RealTorso
- rightarmglue.Part1 = RealRightArm
- rightarmglue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- rightarmglue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
- local leftarmglue = Instance.new("Glue", RealTorso)
- leftarmglue.Part0 = RealTorso
- leftarmglue.Part1 = RealLeftArm
- leftarmglue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- leftarmglue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- local leftlegglue = Instance.new("Glue", RealTorso)
- leftlegglue.Part0 = RealTorso
- leftlegglue.Part1 = RealLeftleg
- leftlegglue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- leftlegglue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- local rightlegglue = Instance.new("Glue", RealTorso)
- rightlegglue.Part0 = RealTorso
- rightlegglue.Part1 = RealRightleg
- rightlegglue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- rightlegglue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- local headglue = Instance.new("Glue", RealTorso)
- headglue.Part0 = RealTorso
- headglue.Part1 = RealHead
- headglue.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- headglue.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
- RealTorso["Left Hip"]:Destroy()
- RealTorso["Right Hip"]:Destroy()
- RealTorso["Left Shoulder"]:Destroy()
- RealTorso["Right Shoulder"]:Destroy()
- RealTorso.Neck:Destroy()
- RealTorso["Left Hip"]:Destroy()
- RealTorso["Right Hip"]:Destroy()
- RealTorso["Left Shoulder"]:Destroy()
- RealTorso["Right Shoulder"]:Destroy()
- RealTorso.Neck:Destroy()
- RealTorso["Left Hip"]:Destroy()
- RealTorso["Right Hip"]:Destroy()
- RealTorso["Left Shoulder"]:Destroy()
- RealTorso["Right Shoulder"]:Destroy()
- RealTorso.Neck:Destroy()
- RealTorso["Left Hip"]:Destroy()
- RealTorso["Right Hip"]:Destroy()
- RealTorso["Left Shoulder"]:Destroy()
- RealTorso["Right Shoulder"]:Destroy()
- RealTorso.Neck:Destroy()
- RealTorso["Left Hip"]:Destroy()
- RealTorso["Right Hip"]:Destroy()
- RealTorso["Left Shoulder"]:Destroy()
- RealTorso["Right Shoulder"]:Destroy()
- RealTorso.Neck:Destroy()
- for i,v in pairs(RealTorso:GetChildren()) do
- if v.ClassName == "Motor6D" then
- v:remove()
- end
- end
- player.Humanoid.BreakJointsOnDeath = false
- RealTorso.CanCollide = false
- end
- end))
- for i,v in pairs(player:GetChildren()) do
- if v.Name == "Head" or v.Name == "Torso" or v.Name == "UpperTorso" then
- weldo = Instance.new("Weld",v)
- weldo.Part0 = ragdoll[v.Name]
- weldo.Part1 = v
- end
- end
- end
- end)
Add Comment
Please, Sign In to add comment