Prephy

rar

Oct 21st, 2021 (edited)
1,019
0
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=17
  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/3
  328. local ANGLE = 10
  329. local FPS = 0.1
  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.2
  533.         Rightshoulder:SetDesiredAngle(0)
  534.         return
  535.     end
  536.  
  537.     if (toolAnim == "Lunge") then
  538.         Rightshoulder.MaxVelocity = 0.2
  539.         Leftshoulder.MaxVelocity = 0.2
  540.         Righthip.MaxVelocity = 0.2
  541.         Lefthip.MaxVelocity = 0.2
  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. Torso.CFrame = Torso.CFrame*CFrame.new(0,-0.001,0)
  552.     if Pose=="running" or Pose=="climbing" or Pose=="falling" then
  553.         local anglespeed = 0.2 - walkspeed*0.005
  554.         if anglespeed>0.01 then
  555.             movespeed=anglespeed
  556.             FPS=0.05
  557.         else
  558.             movespeed=0.01
  559.             FPS=0
  560.         end
  561.         if Pose=="climbing" then
  562.             Humanoid:MoveTo(Torso.CFrame*CFrame.new(0,0,-1.5).Position)
  563.  
  564.         end
  565.     end
  566.     if Pose=="jumping" then
  567.         moveJump()
  568.         return
  569.     end
  570.  
  571.     if Pose=="falling" then
  572.         moveFreeFall()
  573.         return
  574.     end
  575.  
  576.     if Pose=="climbing" then
  577.         moveclimb(desiredangle,math.rad(180))
  578.         return
  579.     end
  580.  
  581.     if Pose=="sitting" then
  582.         moveSit()
  583.         return
  584.     end
  585.     if Pose=="running" then
  586.  
  587.         ANGLE=9.5
  588.         Lefthip:SetDesiredAngle(-desiredangle*6.65)
  589.         Righthip:SetDesiredAngle(-desiredangle*6.65)
  590.         Leftshoulder:SetDesiredAngle(desiredangle*6.5+desiredangle)
  591.         Rightshoulder:SetDesiredAngle(desiredangle*6.5+desiredangle)
  592.         --Lefthip.DesiredAngle = -desiredangle*6.65+desiredangle
  593.         --Righthip.DesiredAngle = -desiredangle*6.65+desiredangle
  594.         --Rightshoulder.DesiredAngle = desiredangle*6.5+desiredangle
  595.         --Leftshoulder.DesiredAngle = desiredangle*6.5+desiredangle
  596.         if (Rightshoulder.CurrentAngle > 1.5 or Rightshoulder.CurrentAngle < -1.5) then
  597.             Rightshoulder.MaxVelocity = 0.1
  598.         else           
  599.             if movespeed>-0.01 then
  600.                 Rightshoulder.MaxVelocity = 0.15/2
  601.                 Righthip.MaxVelocity = 0.2/4
  602.             else
  603.                 Righthip.MaxVelocity = .7
  604.                 Rightshoulder.MaxVelocity = .7
  605.             end    
  606.         end
  607.         if (Leftshoulder.CurrentAngle > 1.5 or Leftshoulder.CurrentAngle < -1.5) then
  608.             Leftshoulder.MaxVelocity = 0.1
  609.         else           
  610.             if movespeed>-0.01 then
  611.                 Leftshoulder.MaxVelocity = 0.15/2
  612.                 Lefthip.MaxVelocity = 0.2/4
  613.             else
  614.                 Lefthip.MaxVelocity = .7
  615.                 Leftshoulder.MaxVelocity = .7
  616.             end
  617.         end
  618.     end
  619.     if Pose=="standing" or Pose=="platformstand" then
  620.         if (Rightshoulder.CurrentAngle > 1.5 or Rightshoulder.CurrentAngle < -1.5) then
  621.             Rightshoulder.MaxVelocity = 0.25/2
  622.         end
  623.         if (Leftshoulder.CurrentAngle > 1.5 or Leftshoulder.CurrentAngle < -1.5) then
  624.             Leftshoulder.MaxVelocity = 0.25/2
  625.         end
  626.         ANGLE=10
  627.         movespeed = 1
  628.         Lefthip.DesiredAngle = -desiredangle
  629.         Righthip.DesiredAngle = -desiredangle
  630.         Rightshoulder.DesiredAngle = desiredangle
  631.         Leftshoulder.DesiredAngle = desiredangle
  632.     end
  633.  
  634.  
  635.  
  636.     local tool = getTool()
  637.  
  638.     if tool then
  639.         animStringValueObject = getToolAnim(tool)
  640.  
  641.         if animStringValueObject then
  642.             toolAnim = animStringValueObject.Value
  643.             -- message recieved, delete StringValue
  644.             animStringValueObject.Parent = nil
  645.             toolAnimTime = time+.3
  646.         end
  647.  
  648.         if time > toolAnimTime then
  649.             toolAnimTime = 0
  650.             toolAnim = "None"
  651.         end
  652.  
  653.         animateTool()
  654.  
  655.  
  656.     else
  657.         toolAnim = "None"
  658.         toolAnimTime = 0
  659.     end
  660.  
  661.  
  662. end
  663.  
  664. function onSeated()
  665.     Pose="sitting"
  666. end
  667.  
  668. function onRunning(speed)
  669.     --if Pose=="climbing" then return end
  670.     local Torsovelocity = (Torso.Velocity * Vector3.new(1,0,1)).magnitude
  671.     if speed>0 then
  672.         Pose="running"
  673.         sRunning:play()
  674.     else
  675.         movespeed=1
  676.         Pose="standing"
  677.         sRunning:pause()
  678.     end
  679. end
  680.  
  681. function onDied()
  682.     Pose="died"
  683.     sDied:play()
  684. end
  685.  
  686. function onJumping()
  687.     Pose="jumping"
  688.     sJumping:Play()
  689. end
  690.  
  691. function onClimbing()
  692.     Pose="climbing"
  693. end
  694.  
  695. function onGettingUp()
  696.     Pose="standingup"
  697. end
  698.  
  699. function onFreeFall()
  700.     Pose="falling"
  701. end
  702.  
  703. function onFallingDown()
  704.     Pose="falling"
  705. end
  706.  
  707. function onPlatformStanding()
  708.     Pose="platformstand"
  709. end
  710.  
  711. function onSwimming()
  712.     Pose="swimming"
  713. end
  714.  
  715.  
  716.  
  717.  
  718.  
  719. Humanoid.Died:connect(onDied)
  720. Humanoid.Running:connect(onRunning)
  721. Humanoid.Jumping:connect(onJumping)
  722. Humanoid.Climbing:connect(onClimbing)
  723. Humanoid.GettingUp:connect(onGettingUp)
  724. Humanoid.FreeFalling:connect(onFreeFall)
  725. Humanoid.FallingDown:connect(onFallingDown)
  726. Humanoid.Seated:connect(onSeated)
  727. Humanoid.PlatformStanding:connect(onPlatformStanding)
  728. Humanoid.Swimming:connect(onSwimming)
  729. Mouse.Button1Down:Connect(clickmovement)
  730.  
  731.  
  732. --sound functions
  733.  
  734.  
  735.  
  736. function onState(state, sound)
  737.     if state then
  738.         sound:play()
  739.     else
  740.         sound:pause()
  741.     end
  742. end
  743.  
  744.  
  745. Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)
  746. Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)
  747. Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)
  748. Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
  749.  
  750.  
  751. while true do
  752.     local _, time = wait(FPS)
  753.     if Figure.Parent~=nil then else
  754.         rem:Disconnect() break
  755.     end
  756.     local jumpVelocity = Torso.Velocity.y
  757.     walkspeed = Humanoid.WalkSpeed
  758.     local angle = math.sin(-tick()/movespeed)/ANGLE
  759.     Move(angle,time)
  760.     if jumpVelocity>5 or jumpVelocity<-5 then
  761.         jumpcooldown(jumpVelocity)
  762.     end
  763.     diskpos()
  764. end
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773. ]],owner.Character)
  774.  
  775.  
Add Comment
Please, Sign In to add comment