WellSumo

Roblox FE Script Test

Jan 23rd, 2020 (edited)
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.37 KB | None | 0 0
  1. wait(0.5)
  2.  
  3. local Player = owner
  4. local character = Player.Character
  5. --^^^^ FE Compatibility ^^^^--
  6. character.Humanoid.WalkSpeed = 25
  7. --workspace.Gravity = 70--80--90
  8. local ttw = 0.5
  9. local frame = 0
  10. function getdirection (direction,orientation,typ)
  11. if typ == "Y" then
  12. local mover = CFrame.new(Vector3.new(0,0,0),direction)
  13. local x, y, z = mover:ToOrientation()
  14. local final = math.deg(y) - orientation.Y
  15. return final
  16. end
  17. end
  18. --print((character.Humanoid.WalkSpeed/16)*0.5)
  19. local rv = Instance.new("BoolValue",character)
  20. rv.Name = "RD"
  21. rv.Value = false
  22. local children = character:GetChildren()
  23. for c = 1,#children do
  24. local child = children[c]
  25. if child then
  26. if child.ClassName == "CharacterMesh" or child.ClassName == "Accessory" then
  27. child:Destroy()
  28. end
  29. end
  30. end
  31. local leftlegA = Instance.new("Attachment",character["Left Leg"])
  32. leftlegA.Name = "LLA"
  33. leftlegA.Position = Vector3.new(0,1,0)
  34. local leftlegB = Instance.new("Attachment",character.Torso)
  35. leftlegB.Name = "LLB"
  36. leftlegB.Position = Vector3.new(-0.5,-1,0)
  37. local phylleg = Instance.new("BallSocketConstraint",character.Torso)
  38. phylleg.Name = "LegJoint"
  39. phylleg.Attachment0 = leftlegA
  40. phylleg.Attachment1 = leftlegB
  41. character.Torso["Left Hip"].Part1 = nil
  42. local rightlegA = Instance.new("Attachment",character["Right Leg"])
  43. rightlegA.Name = "LLA"
  44. rightlegA.Position = Vector3.new(0,1,0)
  45. local rightlegB = Instance.new("Attachment",character.Torso)
  46. rightlegB.Name = "LLB"
  47. rightlegB.Position = Vector3.new(0.5,-1,0)
  48. local phylleg = Instance.new("BallSocketConstraint",character.Torso)
  49. phylleg.Name = "LegJoint"
  50. phylleg.Attachment0 = rightlegA
  51. phylleg.Attachment1 = rightlegB
  52. character.Torso["Right Hip"].Part1 = nil
  53. local leftarmA = Instance.new("Attachment",character["Left Arm"])
  54. leftarmA.Name = "LLA"
  55. leftarmA.Position = Vector3.new(0,0.5,0)
  56. local leftarmB = Instance.new("Attachment",character.Torso)
  57. leftarmB.Name = "LLB"
  58. leftarmB.Position = Vector3.new(-1.5,0.5,0)
  59. local phylarm = Instance.new("BallSocketConstraint",character.Torso)
  60. phylarm.Name = "armJoint"
  61. phylarm.Attachment0 = leftarmA
  62. phylarm.Attachment1 = leftarmB
  63. character.Torso["Left Shoulder"].Part1 = nil
  64. local rightarmA = Instance.new("Attachment",character["Right Arm"])
  65. rightarmA.Name = "LLA"
  66. rightarmA.Position = Vector3.new(0,0.5,0)
  67. local rightarmB = Instance.new("Attachment",character.Torso)
  68. rightarmB.Name = "LLB"
  69. rightarmB.Position = Vector3.new(1.5,0.5,0)
  70. local phylarm = Instance.new("BallSocketConstraint",character.Torso)
  71. phylarm.Name = "armJoint"
  72. phylarm.Attachment0 = rightarmA
  73. phylarm.Attachment1 = rightarmB
  74. character.Torso["Right Shoulder"].Part1 = nil
  75. local llb = Instance.new("Part",character["Left Leg"])
  76. llb.Size = character["Left Leg"].Size
  77. llb.CFrame = character["Left Leg"].CFrame
  78. llb.Name = "Collision"
  79. llb.Transparency = 1
  80. local llbweld = Instance.new("WeldConstraint",llb)
  81. llbweld.Part0 = llb
  82. llbweld.Part1 = character["Left Leg"]
  83. local rlb = Instance.new("Part",character["Right Leg"])
  84. rlb.Size = character["Right Leg"].Size
  85. rlb.CFrame = character["Right Leg"].CFrame
  86. rlb.Name = "Collision"
  87. rlb.Transparency = 1
  88. local rlbweld = Instance.new("WeldConstraint",rlb)
  89. rlbweld.Part0 = rlb
  90. rlbweld.Part1 = character["Right Leg"]
  91. local lab = Instance.new("Part",character["Left Arm"])
  92. lab.Size = character["Left Arm"].Size
  93. lab.CFrame = character["Left Arm"].CFrame
  94. lab.Name = "Collision"
  95. lab.Transparency = 1
  96. local labweld = Instance.new("WeldConstraint",lab)
  97. labweld.Part0 = lab
  98. labweld.Part1 = character["Left Arm"]
  99. local rab = Instance.new("Part",character["Right Arm"])
  100. rab.Size = character["Right Arm"].Size
  101. rab.CFrame = character["Right Arm"].CFrame
  102. rab.Name = "Collision"
  103. rab.Transparency = 1
  104. local rabweld = Instance.new("WeldConstraint",rab)
  105. rabweld.Part0 = rab
  106. rabweld.Part1 = character["Right Arm"]
  107. character.Humanoid.PlatformStand = true
  108. local nocll = Instance.new("NoCollisionConstraint",character["Left Leg"])
  109. nocll.Part0 = llb
  110. nocll.Part1 = character.Torso
  111. local nocrl = Instance.new("NoCollisionConstraint",character["Right Leg"])
  112. nocrl.Part0 = rlb
  113. nocrl.Part1 = character.Torso
  114. local nocla = Instance.new("NoCollisionConstraint",character["Left Arm"])
  115. nocla.Part0 = lab
  116. nocla.Part1 = character.Torso
  117. local nocra = Instance.new("NoCollisionConstraint",character["Right Arm"])
  118. nocra.Part0 = rab
  119. nocra.Part1 = character.Torso
  120. local lrl = Instance.new("NoCollisionConstraint",character.Torso)
  121. lrl.Part0 = rlb
  122. lrl.Part1 = llb
  123. character.Humanoid.WalkSpeed = 20
  124. local gy = Instance.new("BodyGyro",character.Torso)
  125. gy.MaxTorque = Vector3.new(40000000, 40000000, 40000000)
  126. gy.D = 50
  127. gy.P = 500
  128. local ll = Instance.new("Attachment",character.Torso)
  129. ll.Name = "LA"
  130. local rl = Instance.new("Attachment",character.Torso)
  131. rl.Name = "RA"
  132. local llc = Instance.new("Attachment",character["Left Leg"])
  133. llc.Name = "LCA"
  134. local rlc = Instance.new("Attachment",character["Right Leg"])
  135. rlc.Name = "RCA"
  136. local lj = Instance.new("AlignOrientation",character["Left Leg"])
  137. lj.Name = "LO"
  138. lj.Attachment0 = llc
  139. lj.Attachment1 = ll
  140. lj.MaxTorque = 1000000000000000000
  141. lj.Responsiveness = 45
  142. local rj = Instance.new("AlignOrientation",character["Right Leg"])
  143. rj.Name = "RO"
  144. rj.Attachment0 = rlc
  145. rj.Attachment1 = rl
  146. rj.MaxTorque = 1000000000000000000
  147. rj.Responsiveness = 45
  148. local frame = 0
  149. local moveval = 0
  150. local vel = Instance.new("BodyVelocity",character.Torso)
  151. vel.MaxForce = Vector3.new(40000000,0,40000000)
  152. local force = Instance.new("BodyForce",character.HumanoidRootPart)
  153. force.Force = Vector3.new(0,0,0)
  154. function getmass ()
  155. local totalmass = 0
  156. local children = character:GetDescendants()
  157. for dec = 1,#children do
  158. local child = children[dec]
  159. if string.match(child.ClassName , "Part") then
  160. totalmass = totalmass + child:GetMass()
  161. end
  162. end
  163. return totalmass
  164. end
  165. local derb = game:GetService("Debris")
  166. local landed = true
  167. local mv = true
  168. game:GetService("RunService").Stepped:Connect(function()
  169. gy.CFrame = CFrame.new(character.Torso.Position,Player:GetMouse())--(character.Torso.Position+(character.HumanoidRootPart.CFrame.LookVector*0.5)+character.Humanoid.MoveDirection))--workspace.CurrentCamera.CFrame
  170. --ll.CFrame = CFrame.Angles(0,math.rad(-character.Torso.Orientation.Y),0) * character.Torso["Left Hip"].C0
  171. --rl.CFrame = CFrame.Angles(0,math.rad(-character.Torso.Orientation.Y),0) * character.Torso["Right Hip"].C0
  172. local mass = getmass()
  173. vel.Velocity = character.Humanoid.MoveDirection * character.Humanoid.WalkSpeed
  174. force.Force = ((character.Humanoid.MoveDirection * character.Humanoid.WalkSpeed)*(mass))*moveval --25
  175. if rv.Value == true or landed == false then
  176. rj.MaxTorque = 0
  177. lj.MaxTorque = 0
  178. gy.MaxTorque = Vector3.new(0,0,0)
  179. vel.MaxForce = Vector3.new(0,0,0)
  180. if mv == true then
  181. moveval = 1
  182. else
  183. moveval = 0
  184. end
  185. else
  186. rj.MaxTorque = 10000000000000000000
  187. lj.MaxTorque = 10000000000000000000
  188. gy.MaxTorque = Vector3.new(40000000, 40000000, 40000000)
  189. vel.MaxForce = Vector3.new(40000000,0,40000000)
  190. moveval = 0
  191. end
  192. if character.Humanoid.Health == 0 then
  193. script:Destroy()
  194. end
  195. if math.abs(character.Humanoid.MoveDirection.Magnitude) ~= 0 then
  196. ttw = (1.1) - ((character.Humanoid.WalkSpeed*2)*(0.0625*0.35)) --0.65
  197. local direction = getdirection(character.Humanoid.MoveDirection , character.Torso.Orientation,"Y")
  198. local dir = 0
  199. if frame == 0 then
  200. character.Torso.LA.CFrame = CFrame.Angles(math.rad(-character.Torso.Orientation.X),math.rad(--[[direction]]0),0) * CFrame.Angles(math.rad(40),0,0)-- * CFrame.Angles(0,math.rad(-direction)*dir,0)
  201. character.Torso.RA.CFrame = CFrame.Angles(math.rad(-character.Torso.Orientation.X),math.rad(--[[direction]]0),0) * CFrame.Angles(math.rad(-40),0,0)-- * CFrame.Angles(0,math.rad(-direction)*dir,0)
  202. elseif frame ~= 0 then
  203. character.Torso.LA.CFrame = CFrame.Angles(math.rad(-character.Torso.Orientation.X),math.rad(--[[direction]]0),0) * CFrame.Angles(math.rad(-40),0,0)-- * CFrame.Angles(0,math.rad(-direction)*dir,0)
  204. character.Torso.RA.CFrame = CFrame.Angles(math.rad(-character.Torso.Orientation.X),math.rad(--[[direction]]0),0) * CFrame.Angles(math.rad(40),0,0)-- * CFrame.Angles(0,math.rad(-direction)*dir,0)
  205. end
  206. else
  207. character.Torso.LA.CFrame = CFrame.Angles(math.rad(-character.Torso.Orientation.X),0,0)
  208. character.Torso.RA.CFrame = CFrame.Angles(math.rad(-character.Torso.Orientation.X),0,0)
  209. end
  210. local ray = Ray.new(character.Torso.Position , -Vector3.new(0,3.3,0))---Vector3.new(-character.Humanoid.MoveDirection.X*1.25,character.Hight.Value,-character.Humanoid.MoveDirection.Z*1.25)
  211. local h , pos = workspace:FindPartOnRay(ray , character , false , true)
  212. if h and h.Name ~= "Handle" then
  213. landed = true
  214. end
  215. if character.Humanoid.Jump == true then
  216. if (h and h.Name ~= "Handle" and h.CanCollide == true) or character:FindFirstChild("water") then
  217. landed = false
  218. local jump = Instance.new("BodyVelocity",character.Head)
  219.  
  220. if character:FindFirstChild("water") then
  221. jump.Velocity = Vector3.new(0,40--[[*0.6]],0)
  222. jump.MaxForce = Vector3.new(0,5000,0)
  223. else
  224. jump.Velocity = Vector3.new(0,40,0)
  225. jump.MaxForce = Vector3.new(0,9999999,0)
  226. end
  227. jump.Name = "JMP"
  228. jump.P = 1250
  229. derb:AddItem(jump,0.1)
  230. --[[if character:FindFirstChild("water") then
  231. wait(2)
  232. end]]--
  233. landed = false
  234. wait(0.25)
  235. landed = false
  236. end
  237. end
  238. end)
  239. while wait(ttw) do
  240. if frame == 0 then
  241. frame = 1
  242. elseif frame ~= 0 then
  243. frame = 0
  244. end
  245. end
Add Comment
Please, Sign In to add comment