Prephy

rar

Oct 21st, 2021 (edited)
776
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. warn[[
  2. Mr.Brick
  3. Made by projor22
  4. ]]
  5.  
  6. --literally just mr.brick but i badly added a animation to it
  7.  
  8. local player = owner
  9. local old = nil
  10. local character = player.Character
  11. local mod = Instance.new("Model",workspace) mod.Name=">Mr.Brick<"
  12. local hed = Instance.new("FlagStand",mod) hed.Size = Vector3.new(2,1,1) hed.Name = "Head" hed.Transparency=0 hed.Anchored=false hed.CanCollide=false
  13. local mesh = Instance.new("SpecialMesh",hed) mesh.MeshId="rbxassetid://1104623876" mesh.Scale = Vector3.new(1.25, 1.25, 1.25)
  14. local tor = Instance.new("FlagStand",mod) tor.Name = "Torso" tor.Size = Vector3.new(2,2,1) tor.Transparency=0 tor.Anchored=false tor.CanCollide=true
  15. local right_arm = Instance.new("FlagStand",mod) right_arm.Size=Vector3.new(1,2,1) right_arm.Transparency=0 right_arm.Name = "Right Arm" right_arm.Anchored=false
  16. local left_arm = Instance.new("FlagStand",mod) left_arm.Size=Vector3.new(1,2,1) left_arm.Transparency=0 left_arm.Name = "Left Arm" left_arm.Anchored=false
  17. local right_leg = Instance.new("FlagStand",mod) right_leg.Size=Vector3.new(1,2,1) right_leg.Transparency=0 right_leg.Name = "Right Leg" right_leg.Anchored=false
  18. local left_leg = Instance.new("FlagStand",mod) left_leg.Size=Vector3.new(1,2,1) left_leg.Transparency=0 left_leg.Name = "Left Leg" left_leg.Anchored=false
  19. local faker =  Instance.new("FlagStand",mod) faker.Name = " " faker.Size =  Vector3.new(2.001,2.001,1.001)
  20. local weld = Instance.new("Weld",faker) weld.Part0=faker weld.Part1=tor
  21.  
  22. local old = nil
  23. old = tor
  24.  
  25.  
  26. local Torso = tor
  27. old=tor
  28. function makeJoint(limbName, jointName, c0, c1)
  29.     local limb = limbName
  30.     limb:BreakJoints()
  31.     local joint = Instance.new"Motor6D"
  32.     joint.Name = jointName
  33.     joint.Part0 = Torso
  34.     joint.Part1 = limb
  35.     joint.C0 = c0
  36.     joint.C1 = c1
  37.     joint.MaxVelocity = 0.1
  38.     joint.archivable = false
  39.     joint.Parent = Torso
  40.     return joint
  41. end
  42. local Neck = makeJoint(hed,"Neck", CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0))
  43. local RightShoulder = makeJoint(right_arm, "Right Shoulder", CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0), CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0))
  44. local LeftShoulder = makeJoint(left_arm, "Left Shoulder", CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0), CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0))
  45. local RightHip = makeJoint(right_leg, "Right Hip", CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0), CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0))
  46. local LeftHip = makeJoint(left_leg, "Left Hip", CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0), CFrame.new(-0.5, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0))
  47. if character then
  48.     local torsotest = character:FindFirstChild("Torso")
  49.     if torsotest then
  50.         tor.CFrame = torsotest.CFrame
  51.         player.Character = mod 
  52.  
  53.     else
  54.         local headtest = character:FindFirstChild("Head")
  55.         if headtest then
  56.             hed.CFrame=headtest.CFrame
  57.             player.Character = mod 
  58.  
  59.         else
  60.             local fake = workspace:FindFirstChild("fakerhead")
  61.             if fake then
  62.                 hed.CFrame=fake.CFrame
  63.                 player.Character = mod 
  64.  
  65.             else
  66.                 print("respawning")
  67.                 player:LoadCharacter()
  68.                 wait(.4)
  69.                 player.Character = mod 
  70.  
  71.             end
  72.         end
  73.     end
  74. else
  75.     print("respawning")
  76.     player:LoadCharacter()
  77.     wait(.4)
  78.     player.Character = mod 
  79.  
  80. end
  81.  
  82. local f = Instance.new("ForceField",mod) f.Visible=false f.Name=" "
  83. local remo = Instance.new("RemoteEvent",mod) remo.Name="guess"
  84. local ghostify = false
  85. hm=false
  86. remo.OnServerEvent:Connect(function(pl, attack)
  87.     if hm == false then
  88.         if ghostify == false then
  89.             ghostify=true
  90.             local motor =   player.Character.Torso:FindFirstChild("Right Shoulder")
  91.             local motor2 = player.Character.Torso:FindFirstChild("Left Shoulder")
  92.             if motor then
  93.                 if motor2 then
  94.                     motor2.DesiredAngle=-1.56
  95.                 end
  96.                 motor.DesiredAngle=1.56
  97.                 local head = hed
  98.                 if head then
  99.                     local look = head:FindFirstChild("Decal")
  100.                     if look then
  101.  
  102.                     else
  103.  
  104.                     end
  105.                 end
  106.             end
  107.         else
  108.             ghostify=false
  109.             local motor = player.Character.Torso:FindFirstChild("Left Shoulder")
  110.             local motor2 =  player.Character.Torso:FindFirstChild("Right Shoulder")
  111.             if motor2 then
  112.                 if motor then
  113.                     motor.DesiredAngle=0
  114.                 end
  115.                 motor2.DesiredAngle=0
  116.  
  117.             end
  118.         end
  119.     end
  120. end)
  121.  
  122. function Kill(die)
  123.     die:BreakJoints()
  124.     die.Name="part"
  125.     die.Color = Color3.new(.5,.5,.5)
  126.     for i,g in pairs(die:GetDescendants()) do
  127.         if g:IsA("BasePart") then
  128.         g:BreakJoints()
  129.         g.Color = Color3.new(.5,.5,.5)
  130.             g.Name="part"
  131.             local bp = Instance.new("BodyVelocity",g)
  132.             bp.MaxForce = Vector3.new(0,math.huge,0)   
  133.        
  134.         end
  135.     end
  136. end
  137.  
  138.  
  139.  
  140. tor.Touched:Connect(function(par)
  141.     if ghostify==true then
  142.         if par.Parent ~= workspace and par.Parent ~= workspace.Terrain and not par:IsDescendantOf(mod) then
  143.             for i,g in pairs(par.Parent:GetDescendants()) do
  144.                 if g:IsA("BasePart") then
  145.                     if g.Name=="BasePlate" then
  146.  
  147.                     else
  148.                         Kill(g)
  149.  
  150.  
  151.                    
  152.                     end
  153.                 end
  154.             end
  155.         end
  156.     end
  157. end)
  158.  
  159. local rem = Instance.new("RemoteEvent",player.Character) rem.Name="yes"
  160. local tel = Instance.new("RemoteEvent",player.Character) tel.Name="tp"
  161. local killer = Instance.new("RemoteEvent",player.Character) killer.Name="lIIl"
  162.  
  163.  
  164. local wave = true
  165.  
  166. rem.OnServerEvent:connect(function(plr, wav)
  167.     if wav then
  168.         if hm == false then
  169.             if ghostify==false then
  170.                 if wave == true then
  171.                     wave=false
  172.                     local motor =   player.Character.Torso:FindFirstChild("Right Shoulder")
  173.                     if motor then
  174.                         motor.DesiredAngle=3.144
  175.                     end
  176.                 else
  177.                     wave=true
  178.                     local motor2 =  player.Character.Torso:FindFirstChild("Right Shoulder")
  179.                     if motor2 then
  180.                         motor2.DesiredAngle=0
  181.                     end
  182.                 end
  183.  
  184.             end
  185.         end
  186.     end
  187.  
  188. end)
  189.  
  190. tel.OnServerEvent:connect(function(plr, position)
  191.     tor.Position=position + Vector3.new(0,3,0)
  192. end)
  193.  
  194. killer.OnServerEvent:connect(function(plr, target)
  195.     local mt=target
  196.     if mt then
  197.         if mt.Parent.ClassName == "Model" then
  198.             Kill(mt.Parent)
  199.  
  200.  
  201.         elseif mt.Parent.Parent.ClassName == "Model" then
  202.             Kill(mt.Parent.Parent)
  203.  
  204.  
  205.  
  206.  
  207.         end
  208.  
  209.     end
  210. end)
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217. local leftarm = Instance.new("CharacterMesh",mod)
  218. leftarm.BodyPart = Enum.BodyPart.LeftArm
  219. leftarm.MeshId= "1112256772"
  220. local righttarm = Instance.new("CharacterMesh",mod)
  221. righttarm.BodyPart = Enum.BodyPart.RightArm
  222. righttarm.MeshId = "1112244824"
  223. local leftleg = Instance.new("CharacterMesh",mod)
  224. leftleg.BodyPart = Enum.BodyPart.LeftLeg
  225. leftleg.MeshId = "1112275294"
  226. local rightleg = Instance.new("CharacterMesh",mod)
  227. rightleg.BodyPart = Enum.BodyPart.RightLeg
  228. rightleg.MeshId = "1112267576"
  229. local torso = Instance.new("CharacterMesh",mod)
  230. torso.BodyPart = Enum.BodyPart.Torso
  231. torso.MeshId = "1112228624"
  232.  
  233.  
  234.  
  235.  
  236. NLS([[
  237. local player = game:GetService("Players").LocalPlayer
  238. local hum = Instance.new("Humanoid",player.Character) hum.MaxHealth = -300 hum.Health=-300 hum.Name = "" hum.BreakJointsOnDeath=false hum.RequiresNeck=false hum.WalkSpeed=13  
  239. workspace.CurrentCamera:Destroy()
  240. wait()
  241. workspace.CurrentCamera.CameraSubject = hum
  242. workspace.CurrentCamera.CameraType = "Custom"
  243. local mouse = player:GetMouse()
  244. local remote = player.Character:WaitForChild("guess")
  245. local r = player.Character:WaitForChild("yes")
  246. local teleport = player.Character:WaitForChild("tp")
  247. local kills = player.Character:WaitForChild("lIIl")
  248.  
  249. mouse.KeyDown:connect(function(Key)
  250.     Key = Key:lower()
  251.     if  Key == 'c' then
  252.         remote:FireServer("attack")
  253.  
  254.     end
  255.     end)
  256.    
  257.     mouse.KeyDown:connect(function(Key)
  258.     Key = Key:lower()
  259.     if  Key == 'x' then
  260.         r:FireServer("wav")
  261.  
  262.     end
  263. end)
  264.  
  265.     mouse.KeyDown:connect(function(Key)
  266.     Key = Key:lower()
  267.     if  Key == 'z' then
  268.         teleport:FireServer(mouse.Hit.p)
  269.  
  270.     end
  271. end)
  272.  
  273.  
  274.     mouse.KeyDown:connect(function(Key)
  275.     Key = Key:lower()
  276.     if  Key == 'e' then
  277.         kills:FireServer(mouse.Target)
  278.  
  279.     end
  280. end)
  281.    
  282.  
  283.  
  284. ]],player.Character)
  285.  
  286.  
  287. local RunService = game:GetService("RunService")
  288. local RATE_PER_SECOND = 2
  289. RunService.Heartbeat:Connect(function(step)
  290.     local increment = RATE_PER_SECOND * step
  291.     if tor then
  292.        
  293.     else
  294.        
  295.     end
  296.    
  297.    
  298. end)
  299.  
  300. NLS([[
  301.  
  302.  
  303.  
  304.  
  305.  
  306. function newSound(id,Parent1)
  307.     local sound = Instance.new("Sound")
  308.     sound.SoundId = id
  309.     sound.Parent = Parent1
  310.     return sound
  311. end
  312.  
  313.  
  314.  
  315.  
  316. local Player = game:GetService("Players").LocalPlayer
  317. local Figure = Player.Character
  318. local Torso = Figure:WaitForChild("Torso")
  319. local Lefthip = Torso:WaitForChild("Left Hip")
  320. local Righthip = Torso:WaitForChild("Right Hip")
  321. local Humanoid = Figure:FindFirstChildOfClass("Humanoid")
  322. local Rightshoulder = Torso:WaitForChild("Right Shoulder")
  323. local Leftshoulder = Torso:WaitForChild("Left Shoulder")
  324. local walkspeed = Humanoid.WalkSpeed   
  325. local P = game:GetService("PathfindingService")
  326. local movespeed = 1
  327. local jumpMaxLimbVelocity = 0.5
  328. local ANGLE = 10
  329. local FPS = 0.05
  330. local canjump=true
  331. local removing = game.DescendantRemoving
  332. local Mouse = Player:GetMouse()
  333. local MAINDISK = nil
  334. local moveto = nil
  335. local newpath = false
  336. local oldpath
  337. local pathwait
  338. local usingtool = false
  339. local Pose = "standing"
  340. local oldanimate = Figure:FindFirstChild("Animate")
  341. if oldanimate then oldanimate.Disabled=true Humanoid:ClearAllChildren() end
  342.  
  343.  
  344.  
  345.  
  346. local sDied = newSound("rbxasset://sounds/uuhhh.wav",Torso)
  347. local sFallingDown = newSound("rbxasset://sounds/splat.wav",Torso)
  348. local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav",Torso)
  349. local sGettingUp = newSound("rbxasset://sounds/hit.wav",Torso)
  350. local sJumping = newSound("rbxasset://sounds/button.wav",Torso)
  351. local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3",Torso)
  352. sRunning.Looped = true
  353.  
  354.  
  355.  
  356. function clickmovement(END)
  357.     if usingtool then return end
  358.     if not newpath then
  359.         newpath=true
  360.         END = Mouse.Hit.p
  361.         moveto = createdisk()
  362.         moveto.Position = END
  363.         moveto.Orientation = Vector3.new(0,0,90)
  364.         local path = P:CreatePath()
  365.         path:ComputeAsync(Torso.Position, END)
  366.         local waypoints = path:GetWaypoints()
  367.         if path.Status == Enum.PathStatus.Success then
  368.             for _, waypoint in pairs(waypoints) do
  369.                 if waypoint.Action == Enum.PathWaypointAction.Jump then
  370.                     Humanoid.Jump = true
  371.                 end
  372.                 if newpath then
  373.                     Humanoid:MoveTo(waypoint.Position)
  374.                     Humanoid.MoveToFinished:Wait()
  375.                 else
  376.                     Humanoid:MoveTo(Torso.Position)
  377.                 end
  378.             end
  379.         end
  380.         newpath=false
  381.         moveto:Destroy()
  382.     else
  383.         newpath=false
  384.         if moveto~=nil then
  385.             moveto:Destroy()
  386.         end
  387.         Humanoid:MoveTo(Torso.Position)
  388.     end
  389.  
  390. end
  391.  
  392. function diskpos()
  393.     if MAINDISK~=nil then
  394.         MAINDISK.CFrame = Mouse.Hit
  395.         MAINDISK.Orientation = Vector3.new(0, 0, 90)
  396.         local TOOL = 0
  397.         for i,v in pairs(Player.Backpack:children()) do
  398.             if v:IsA'HopperBin' and v.Active==true then
  399.                 TOOL=TOOL+1
  400.             end
  401.         end
  402.         for i,v in pairs(Player.Character:children()) do
  403.             if v:IsA'Tool' then
  404.                 TOOL=TOOL+1
  405.             end
  406.         end
  407.         if TOOL~=0 then
  408.             usingtool=true
  409.             if MAINDISK.Parent~=nil then
  410.                 MAINDISK.Transparency=1
  411.             end
  412.         else
  413.             if MAINDISK.Parent~=nil then
  414.                 MAINDISK.Transparency=0
  415.             end
  416.             usingtool=false
  417.         end
  418.     end
  419. end
  420.  
  421. function createdisk()
  422.     wait()
  423.     local Disc = Instance.new("Part", Figure)
  424.     if usingtool then
  425.         Disc.Transparency=1
  426.     end
  427.     Disc.Shape = "Cylinder"
  428.     Disc.Size = Vector3.new(0.5, 3.5, 2.5)
  429.     Disc.TopSurface = Enum.SurfaceType.Smooth
  430.     Disc.BottomSurface = Enum.SurfaceType.Smooth
  431.     Disc.Anchored = true
  432.     Disc.CanCollide = false
  433.     Disc.BrickColor = BrickColor.new("Lime green")
  434.     return Disc
  435. end
  436. MAINDISK = createdisk()
  437. local rem = removing:Connect(function(ob)
  438.     if ob==MAINDISK then
  439.         MAINDISK = createdisk()
  440.     end
  441. end)
  442.  
  443.  
  444.  
  445. function jumpcooldown(velocity)
  446.     coroutine.resume(coroutine.create(function()
  447.         if canjump then
  448.             local oldpower = Humanoid.JumpPower
  449.             canjump=false
  450.             local GYRO = Instance.new("BodyGyro",Torso)
  451.             GYRO.D = 25
  452.             GYRO.P = 20000
  453.             GYRO.MaxTorque = Vector3.new(0,math.huge,0)
  454.             GYRO.CFrame = CFrame.new(Torso.Position,Torso.CFrame*CFrame.new(0,0,-3).Position)
  455.             while wait() do
  456.                 if Pose~="falling" and Pose~="jumping" then
  457.                     break
  458.                 else
  459.                     if not canjump then
  460.                         Humanoid.JumpPower=0
  461.                     end
  462.                 end
  463.             end
  464.             GYRO:Destroy()
  465.             wait(.6)
  466.             Humanoid.JumpPower = oldpower
  467.             canjump=true
  468.         end
  469.     end))
  470. end
  471.  
  472. function moveJump()
  473.     Rightshoulder.MaxVelocity = jumpMaxLimbVelocity
  474.     Leftshoulder.MaxVelocity = jumpMaxLimbVelocity
  475.     Rightshoulder:SetDesiredAngle(3.14)
  476.     Leftshoulder:SetDesiredAngle(-3.14)
  477.     Righthip:SetDesiredAngle(0)
  478.     Lefthip:SetDesiredAngle(0)
  479. end
  480.  
  481. function moveFreeFall()
  482.     Rightshoulder.MaxVelocity = jumpMaxLimbVelocity
  483.     Leftshoulder.MaxVelocity = jumpMaxLimbVelocity
  484.     Rightshoulder:SetDesiredAngle(3.14)
  485.     Leftshoulder:SetDesiredAngle(-3.14)
  486.     Righthip:SetDesiredAngle(0)
  487.     Lefthip:SetDesiredAngle(0)
  488. end
  489.  
  490. function moveclimb(desiredangle,climbangle)
  491.     Leftshoulder.MaxVelocity=jumpMaxLimbVelocity
  492.     Rightshoulder.MaxVelocity=jumpMaxLimbVelocity
  493.     Lefthip:SetDesiredAngle(-desiredangle*6.65)
  494.     Righthip:SetDesiredAngle(-desiredangle*6.65)
  495.     Leftshoulder:SetDesiredAngle(desiredangle*6.5-climbangle)
  496.     Rightshoulder:SetDesiredAngle(desiredangle*6.5+climbangle)
  497. end
  498.  
  499. function moveSit()
  500.     Rightshoulder.MaxVelocity = 0.15
  501.     Leftshoulder.MaxVelocity = 0.15
  502.     Rightshoulder:SetDesiredAngle(3.14 /2)
  503.     Leftshoulder:SetDesiredAngle(-3.14 /2)
  504.     Righthip:SetDesiredAngle(3.14 /2)
  505.     Lefthip:SetDesiredAngle(-3.14 /2)
  506. end
  507.  
  508. function getTool() 
  509.     for _, kid in ipairs(Figure:GetChildren()) do
  510.         if kid.className == "Tool" then return kid end
  511.     end
  512.     return nil
  513. end
  514.  
  515. function getToolAnim(tool)
  516.     for _, c in ipairs(tool:GetChildren()) do
  517.         if c.Name == "toolanim" and c.className == "StringValue" then
  518.             return c
  519.         end
  520.     end
  521.     return nil
  522. end
  523.  
  524. function animateTool()
  525.  
  526.     if (toolAnim == "None") then
  527.         Rightshoulder:SetDesiredAngle(1.57)
  528.         return
  529.     end
  530.  
  531.     if (toolAnim == "Slash") then
  532.         Rightshoulder.MaxVelocity = 0.5
  533.         Rightshoulder:SetDesiredAngle(0)
  534.         return
  535.     end
  536.  
  537.     if (toolAnim == "Lunge") then
  538.         Rightshoulder.MaxVelocity = 0.5
  539.         Leftshoulder.MaxVelocity = 0.5
  540.         Righthip.MaxVelocity = 0.5
  541.         Lefthip.MaxVelocity = 0.5
  542.         Rightshoulder:SetDesiredAngle(1.57)
  543.         Leftshoulder:SetDesiredAngle(1.0)
  544.         Righthip:SetDesiredAngle(1.57)
  545.         Lefthip:SetDesiredAngle(1.0)
  546.         return
  547.     end
  548. end
  549.  
  550. function Move(desiredangle,time)
  551.     if Pose=="running" or Pose=="climbing" or Pose=="falling" then
  552.         local anglespeed = 0.2 - walkspeed*0.005
  553.         if anglespeed>0.01 then
  554.             movespeed=anglespeed
  555.             FPS=0.05
  556.         else
  557.             movespeed=0.01
  558.             FPS=0
  559.         end
  560.         if Pose=="climbing" then
  561.             Humanoid:MoveTo(Torso.CFrame*CFrame.new(0,0,-1.5).Position)
  562.  
  563.         end
  564.     end
  565.     if Pose=="jumping" then
  566.         moveJump()
  567.         return
  568.     end
  569.  
  570.     if Pose=="falling" then
  571.         moveFreeFall()
  572.         return
  573.     end
  574.  
  575.     if Pose=="climbing" then
  576.         moveclimb(desiredangle,math.rad(180))
  577.         return
  578.     end
  579.  
  580.     if Pose=="sitting" then
  581.         moveSit()
  582.         return
  583.     end
  584.     if Pose=="running" then
  585.  
  586.         ANGLE=9.5
  587.         Lefthip:SetDesiredAngle(-desiredangle*6.65)
  588.         Righthip:SetDesiredAngle(-desiredangle*6.65)
  589.         Leftshoulder:SetDesiredAngle(desiredangle*6.5+desiredangle)
  590.         Rightshoulder:SetDesiredAngle(desiredangle*6.5+desiredangle)
  591.         --Lefthip.DesiredAngle = -desiredangle*6.65+desiredangle
  592.         --Righthip.DesiredAngle = -desiredangle*6.65+desiredangle
  593.         --Rightshoulder.DesiredAngle = desiredangle*6.5+desiredangle
  594.         --Leftshoulder.DesiredAngle = desiredangle*6.5+desiredangle
  595.         if (Rightshoulder.CurrentAngle > 1.5 or Rightshoulder.CurrentAngle < -1.5) then
  596.             Rightshoulder.MaxVelocity = 0.1
  597.         else           
  598.             if movespeed>-0.01 then
  599.                 Rightshoulder.MaxVelocity = 0.15
  600.                 Righthip.MaxVelocity = 0.2
  601.             else
  602.                 Righthip.MaxVelocity = .7
  603.                 Rightshoulder.MaxVelocity = .7
  604.             end    
  605.         end
  606.         if (Leftshoulder.CurrentAngle > 1.5 or Leftshoulder.CurrentAngle < -1.5) then
  607.             Leftshoulder.MaxVelocity = 0.1
  608.         else           
  609.             if movespeed>-0.01 then
  610.                 Leftshoulder.MaxVelocity = 0.15
  611.                 Lefthip.MaxVelocity = 0.2
  612.             else
  613.                 Lefthip.MaxVelocity = .7
  614.                 Leftshoulder.MaxVelocity = .7
  615.             end
  616.         end
  617.     end
  618.     if Pose=="standing" or Pose=="platformstand" then
  619.         if (Rightshoulder.CurrentAngle > 1.5 or Rightshoulder.CurrentAngle < -1.5) then
  620.             Rightshoulder.MaxVelocity = 0.25
  621.         end
  622.         if (Leftshoulder.CurrentAngle > 1.5 or Leftshoulder.CurrentAngle < -1.5) then
  623.             Leftshoulder.MaxVelocity = 0.25
  624.         end
  625.         ANGLE=10
  626.         movespeed = 1
  627.         Lefthip.DesiredAngle = -desiredangle
  628.         Righthip.DesiredAngle = -desiredangle
  629.         Rightshoulder.DesiredAngle = desiredangle
  630.         Leftshoulder.DesiredAngle = desiredangle
  631.     end
  632.  
  633.  
  634.  
  635.     local tool = getTool()
  636.  
  637.     if tool then
  638.         animStringValueObject = getToolAnim(tool)
  639.  
  640.         if animStringValueObject then
  641.             toolAnim = animStringValueObject.Value
  642.             -- message recieved, delete StringValue
  643.             animStringValueObject.Parent = nil
  644.             toolAnimTime = time+.3
  645.         end
  646.  
  647.         if time > toolAnimTime then
  648.             toolAnimTime = 0
  649.             toolAnim = "None"
  650.         end
  651.  
  652.         animateTool()
  653.  
  654.  
  655.     else
  656.         toolAnim = "None"
  657.         toolAnimTime = 0
  658.     end
  659.  
  660.  
  661. end
  662.  
  663. function onSeated()
  664.     Pose="sitting"
  665. end
  666.  
  667. function onRunning(speed)
  668.     --if Pose=="climbing" then return end
  669.     local Torsovelocity = (Torso.Velocity * Vector3.new(1,0,1)).magnitude
  670.     if speed>0 then
  671.         Pose="running"
  672.         sRunning:play()
  673.     else
  674.         movespeed=1
  675.         Pose="standing"
  676.         sRunning:pause()
  677.     end
  678. end
  679.  
  680. function onDied()
  681.     Pose="died"
  682.     sDied:play()
  683. end
  684.  
  685. function onJumping()
  686.     Pose="jumping"
  687.     sJumping:Play()
  688. end
  689.  
  690. function onClimbing()
  691.     Pose="climbing"
  692. end
  693.  
  694. function onGettingUp()
  695.     Pose="standingup"
  696. end
  697.  
  698. function onFreeFall()
  699.     Pose="falling"
  700. end
  701.  
  702. function onFallingDown()
  703.     Pose="falling"
  704. end
  705.  
  706. function onPlatformStanding()
  707.     Pose="platformstand"
  708. end
  709.  
  710. function onSwimming()
  711.     Pose="swimming"
  712. end
  713.  
  714.  
  715.  
  716.  
  717.  
  718. Humanoid.Died:connect(onDied)
  719. Humanoid.Running:connect(onRunning)
  720. Humanoid.Jumping:connect(onJumping)
  721. Humanoid.Climbing:connect(onClimbing)
  722. Humanoid.GettingUp:connect(onGettingUp)
  723. Humanoid.FreeFalling:connect(onFreeFall)
  724. Humanoid.FallingDown:connect(onFallingDown)
  725. Humanoid.Seated:connect(onSeated)
  726. Humanoid.PlatformStanding:connect(onPlatformStanding)
  727. Humanoid.Swimming:connect(onSwimming)
  728. Mouse.Button1Down:Connect(clickmovement)
  729.  
  730.  
  731. --sound functions
  732.  
  733.  
  734.  
  735. function onState(state, sound)
  736.     if state then
  737.         sound:play()
  738.     else
  739.         sound:pause()
  740.     end
  741. end
  742.  
  743.  
  744. Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)
  745. Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)
  746. Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)
  747. Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
  748.  
  749.  
  750. while true do
  751.     local _, time = wait(FPS)
  752.     if Figure.Parent~=nil then else
  753.         rem:Disconnect() break
  754.     end
  755.     local jumpVelocity = Torso.Velocity.y
  756.     walkspeed = Humanoid.WalkSpeed
  757.     local angle = math.sin(-tick()/movespeed)/ANGLE
  758.     Move(angle,time)
  759.     if jumpVelocity>5 or jumpVelocity<-5 then
  760.         jumpcooldown(jumpVelocity)
  761.     end
  762.     diskpos()
  763. end
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772. ]],owner.Character)
  773.  
  774.  
RAW Paste Data