Advertisement
memberhero

FE Rolling On Yourself Script

Feb 23rd, 2021
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.66 KB | None | 0 0
  1. wait(3)
  2. --FE Version by basstracker1970
  3. local rs = game:GetService("RunService")
  4.  
  5. local plr = game:GetService("Players").LocalPlayer
  6. local char = plr.Character
  7. char.Archivable = true
  8. local cam = workspace:WaitForChild("Camera")
  9.  
  10. local fakechar = char:Clone()
  11. fakechar.Head.face.Texture = ""
  12. fakechar.Parent = workspace
  13. cam.CameraSubject = fakechar:FindFirstChildOfClass("Humanoid")
  14.  
  15. local connections = {}
  16. local kill = false
  17. --sethiddenproperty function
  18. local function sethiddenproperty(player,prop,value)
  19. player[prop] = value
  20. end
  21. -- Align function
  22. local function Align(Part1, Part0, Position, Angle)
  23. Part1.CanCollide = false
  24.  
  25. local AlignPos = Instance.new("AlignPosition")
  26. AlignPos.ApplyAtCenterOfMass = true
  27. AlignPos.MaxForce = 100000
  28. AlignPos.MaxVelocity = math.huge
  29. AlignPos.ReactionForceEnabled = false
  30. AlignPos.Responsiveness = 200
  31. AlignPos.RigidityEnabled = false
  32. AlignPos.Parent = Part1
  33.  
  34. local AlignOri = Instance.new("AlignOrientation")
  35. AlignOri.MaxAngularVelocity = math.huge
  36. AlignOri.MaxTorque = 100000
  37. AlignOri.PrimaryAxisOnly = false
  38. AlignOri.ReactionTorqueEnabled = false
  39. AlignOri.Responsiveness = 200
  40. AlignOri.RigidityEnabled = false
  41. AlignOri.Parent = Part1
  42.  
  43. local at1 = Instance.new("Attachment")
  44. at1.Parent = Part1
  45. local at2 = Instance.new("Attachment")
  46. at2.Parent = Part0
  47. at2.Orientation = Angle
  48. at2.Position = Position
  49.  
  50. AlignPos.Attachment0 = at1
  51. AlignPos.Attachment1 = at2
  52. AlignOri.Attachment0 = at1
  53. AlignOri.Attachment1 = at2
  54. end
  55.  
  56. local success, fail = pcall(function()
  57. -- Make the fake character invisible
  58. for _,v in pairs(fakechar:GetDescendants()) do
  59. if v:IsA("Part") then
  60. v.Transparency = 1
  61. elseif v:IsA("SpecialMesh") then
  62. v.MeshId = "rbxassetid://0"
  63. end
  64. end
  65.  
  66. -- Networking
  67. spawn(function()
  68. while rs.Stepped:wait() and not kill do
  69. settings().Physics.AllowSleep = false
  70.  
  71. sethiddenproperty(plr, "MaximumSimulationRadius", math.pow(math.huge,math.huge) * math.huge)
  72. sethiddenproperty(plr, "SimulationRadius", math.pow(math.huge,math.huge) * math.huge)
  73. end
  74. end)
  75.  
  76. -- Noclipping
  77. table.insert(connections, rs.Stepped:Connect(function()
  78. fakechar:FindFirstChild("Head").CanCollide = false
  79. fakechar:FindFirstChild("Torso").CanCollide = false
  80. char.Head.CanCollide = false
  81. char.Torso.CanCollide = false
  82. end))
  83. table.insert(connections, rs.Heartbeat:Connect(function()
  84. fakechar:FindFirstChild("Head").CanCollide = false
  85. fakechar:FindFirstChild("Torso").CanCollide = false
  86. char.Head.CanCollide = false
  87. char.Torso.CanCollide = false
  88. end))
  89. table.insert(connections, rs.RenderStepped:Connect(function()
  90. fakechar:FindFirstChild("Head").CanCollide = false
  91. fakechar:FindFirstChild("Torso").CanCollide = false
  92. char.Head.CanCollide = false
  93. char.Torso.CanCollide = false
  94. end))
  95.  
  96. -- Rigging
  97. char.Torso["Right Shoulder"]:Destroy()
  98. char.Torso["Left Shoulder"]:Destroy()
  99. char.Torso["Right Hip"]:Destroy()
  100. char.Torso["Left Hip"]:Destroy()
  101. char.HumanoidRootPart["RootJoint"]:Destroy()
  102. char.HumanoidRootPart.Anchored = true
  103. char.Humanoid.PlatformStand = true
  104. fakechar["Torso"].Position = char["Torso"].Position
  105.  
  106. -- Align
  107. for _,v in pairs(char:GetChildren()) do
  108. if v:IsA("Part") and v.Name ~= "Head" then
  109. if v.Name == "Torso" then
  110. Align(char[v.Name], fakechar[v.Name], Vector3.new(0,0.5,0),Vector3.new(0,0,0))
  111. else
  112. Align(char[v.Name], fakechar[v.Name], Vector3.new(0,0,0),Vector3.new(0,0,0))
  113. end
  114. end
  115. end
  116. end)
  117. if fail then
  118. warn(fail)
  119. plr.Character = char
  120. char:BreakJoints()
  121. fakechar:Destroy()
  122.  
  123. kill = false
  124. return
  125. end
  126.  
  127. -- Cleanup
  128. fakechar.Humanoid.Died:Connect(function()
  129. plr.Character = char
  130. char:BreakJoints()
  131. fakechar:Destroy()
  132.  
  133. kill = false
  134.  
  135. for _,v in pairs(connections) do v:Disconnect() end
  136. end)
  137. char.Humanoid.Died:Connect(function()
  138. plr.Character = char
  139. char:BreakJoints()
  140. fakechar:Destroy()
  141.  
  142. kill = true
  143.  
  144. for _,v in pairs(connections) do v:Disconnect() end
  145. end)
  146.  
  147. plr.Character = fakechar
  148. owner = game.Players.LocalPlayer
  149. sound = Instance.new("Sound",owner.Character.Torso)
  150. sound.SoundId = "rbxassetid://390099251"
  151. sound.Volume = 4
  152. sound:Play()
  153. sound.Looped = true
  154. moving = false
  155. combat = false
  156. scream = Instance.new("Sound",owner.Character.Torso)
  157. scream.SoundId = "rbxassetid://154157312"
  158. scream.Volume = 10
  159. scream.EmitterSize = 5
  160. hurtnoise = Instance.new("Sound",owner.Character.Torso)
  161. hurtnoise.SoundId = "rbxassetid://170014277"
  162. hurtnoise.Volume = 5
  163. larmhit = Instance.new("Sound",owner.Character["Left Arm"])
  164. larmhit.SoundId = "rbxassetid://190017832"
  165. larmhit.Volume = 5
  166. rarmhit = Instance.new("Sound",owner.Character["Right Arm"])
  167. rarmhit.SoundId = "rbxassetid://190017832"
  168. rarmhit.Volume = 5
  169. flange = Instance.new("FlangeSoundEffect",sound)
  170. flange = Instance.new("FlangeSoundEffect",scream)
  171. remote = Instance.new("RemoteEvent",owner.Character)
  172. remote.Name = "diddley doo doodoodododoododooddod"
  173. owner.Character:FindFirstChild("Animate"):Destroy()
  174. owner.Character.Humanoid.Animator:Destroy()
  175. local torso = owner.Character.Torso
  176. local larm = owner.Character["Left Arm"]
  177. local rarm = owner.Character["Right Arm"]
  178. local lleg = owner.Character["Left Leg"]
  179. local rleg = owner.Character["Right Leg"]
  180. local head = owner.Character.Head
  181. local larmsize = larm.Size
  182. local rarmsize = rarm.Size
  183. local llegsize = lleg.Size
  184. local rlegsize = rleg.Size
  185. local headsize = head.Size
  186. local torsosize = torso.Size
  187.  
  188. local lshoulc0 = torso["Left Shoulder"].C0
  189. local rshoulc0 = torso["Right Shoulder"].C0
  190. local lhipc0 = torso["Left Hip"].C0
  191. local rhipc0 = torso["Right Hip"].C0
  192. local neckc0 = torso["Neck"].C0
  193. for i,v in pairs(owner.Character.Torso:GetDescendants()) do
  194. if v:IsA("JointInstance") and not v:IsA("Glue") then
  195. local e = Instance.new("Glue",v.Parent)
  196. e.Part0 = v.Part0
  197. e.Part1 = v.Part1
  198. e.C0 = v.C0
  199. e.C1 = v.C1
  200. v:Destroy()
  201. end
  202. end
  203. for i,v in pairs(owner.Character.HumanoidRootPart:GetDescendants()) do
  204. if v:IsA("JointInstance") and not v:IsA("Glue") then
  205. local e = Instance.new("Glue",v.Parent)
  206. e.Part0 = v.Part0
  207. e.Part1 = v.Part1
  208. e.C0 = v.C0
  209. e.C1 = v.C1
  210. e.Name = v.Name
  211. v:Destroy()
  212. end
  213. end
  214. for i,v in pairs(owner.Character:GetChildren()) do
  215. if v.Name == "Head" or v.Name == "Right Arm" or v.Name == "Right Leg" or v.Name == "Left Arm" or v.Name == "Left Leg" then
  216. local e = Instance.new("Part",v)
  217. e.Size = Vector3.new(1,1,1)
  218. e.Transparency = 0.3
  219. local weld = Instance.new("Weld",e)
  220. weld.Part0 = v
  221. weld.Part1 = e
  222. e.Transparency = 1
  223. e.Name = "hitbox"
  224. if v.Name ~= "Head" then
  225. weld.C0 = weld.C0 - Vector3.new(0,0.5,0)
  226. end
  227. end
  228. end
  229. debounce = false
  230. for i,v in pairs(owner.Character:GetDescendants()) do
  231. if v:IsA("BasePart") then
  232. v.Touched:Connect(function(p)
  233. if not debounce and combat then
  234. debounce = true
  235. if p.Parent ~= workspace and not p:IsDescendantOf(owner.Character) then
  236. for i,x in pairs(p.Parent:GetDescendants()) do
  237. if x:IsA("Humanoid") then
  238. x.Health = x.Health - x.MaxHealth/5
  239. hurtnoise.Pitch = math.random(80,120)/100
  240. hurtnoise:Play()
  241. end
  242. end
  243. end
  244. wait(math.random(5,10)/100)
  245. debounce = false
  246. end
  247. end)
  248. end
  249. end
  250. owner.Character.Humanoid.HipHeight = -2.5
  251. owner.Character.Humanoid.WalkSpeed = 0
  252. --[[remote.OnServerEvent:Connect(function(player,mode,mhp,t)
  253. if mode == "speedup" and sound.Pitch <= 3 then
  254. sound.Pitch = sound.Pitch + 0.001
  255. if sound.Pitch > 3 then
  256. sound.Pitch = 3
  257. end
  258. elseif mode == "slowdown" then
  259. if sound.Pitch > 1 then
  260. sound.Pitch = sound.Pitch - 0.01
  261. end
  262. elseif mode == "dead" then
  263. sound.Pitch = sound.Pitch - 0.005
  264. elseif mode == "stop" then
  265. scream:Stop()
  266. elseif mode == "moving" then
  267. moving = true
  268. elseif mode == "notmoving" then
  269. moving = false
  270. elseif mode == "Lclimb" then
  271. if t ~= nil and not larm.hitbox:FindFirstChild("climbjoint") then
  272. if (owner.Character.Torso.Position - mhp).magnitude < 24 and t:IsA("BasePart") and t.Name ~= "Base" then
  273. local joint = Instance.new("Glue",larm.hitbox)
  274. local point = Instance.new("Part",joint)
  275. point.Size = Vector3.new()
  276. point.Shape = "Ball"
  277. point.Transparency = 0.3
  278. point.Position = mhp
  279. local constraint = Instance.new("WeldConstraint",joint)
  280. constraint.Part0 = point
  281. constraint.Part1 = t
  282. joint.Name = "climbjoint"
  283. larm.Position = mhp
  284. joint.Part1 = larm.hitbox
  285. joint.Part0 = point
  286. larmhit.Pitch = math.random(95,105)/100
  287. larmhit:Play()
  288. end
  289. end
  290. elseif mode == "Rclimb" then
  291. if t ~= nil and not rarm.hitbox:FindFirstChild("climbjoint") then
  292. if (owner.Character.Torso.Position - mhp).magnitude < 24 and t:IsA("BasePart") and t.Name ~= "Base" then
  293. local joint = Instance.new("Glue",rarm.hitbox)
  294. local point = Instance.new("Part",joint)
  295. point.Size = Vector3.new()
  296. point.Shape = "Ball"
  297. point.Transparency = 0.3
  298. point.Position = mhp
  299. local constraint = Instance.new("WeldConstraint",joint)
  300. constraint.Part0 = point
  301. constraint.Part1 = t
  302. joint.Name = "climbjoint"
  303. rarm.Position = mhp
  304. joint.Part1 = rarm.hitbox
  305. joint.Part0 = point
  306. rarmhit.Pitch = math.random(95,105)/100
  307. rarmhit:Play()
  308. end
  309. end
  310. elseif mode == "Lunclimb" then
  311. if larm.hitbox:FindFirstChild("climbjoint") then
  312. larm.hitbox.climbjoint:Destroy()
  313. end
  314. elseif mode == "Runclimb" then
  315. if rarm.hitbox:FindFirstChild("climbjoint") then
  316. rarm.hitbox.climbjoint:Destroy()
  317. end
  318. elseif mode == "enable" then
  319. scream:Play()
  320. combat = true
  321. print("combat enable!1")
  322. elseif mode == "disable" then
  323. combat = false
  324. print("combat disabl.")
  325. end
  326. end)--]]
  327. wait(1)
  328. --made into a require by DerpzDeNugget_YT.S
  329. owner = game.Players.LocalPlayer
  330. print("hi thx for use EricGaming0's scrip")
  331. print("hold left shift for fast")
  332. print("press left ctrl to toggl combat :)")
  333. print("left/right click to grab, has limited range")
  334. mouse = owner:GetMouse()
  335. humanoid = owner.Character.Humanoid
  336. stopmove = true
  337. direction = "none"
  338. cam = workspace.CurrentCamera
  339. mouse = owner:GetMouse()
  340. rotator = Instance.new("BodyAngularVelocity")
  341. rotator.MaxTorque = Vector3.new(0,0,0)
  342. rotator2 = Instance.new("BodyAngularVelocity")
  343. velocity = Instance.new("BodyVelocity")
  344. velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  345. forward = false
  346. left = false
  347. right = false
  348. backward = false
  349. speed = 50
  350. shift = false
  351. xtreme = false
  352. larmstick = false
  353. rarmstick = false
  354. lcombat = false
  355. mouse.KeyDown:Connect(function(k)
  356. if k == "w" and not forward then
  357. forward = true
  358. elseif k == "a" and not left then
  359. left = true
  360. elseif k == "s" and not backward then
  361. backward = true
  362. elseif k == "d" and not right then
  363. right = true
  364. end
  365. if string.byte(k) == 32 then
  366. local ray = Ray.new(owner.Character.Torso.Position, workspace.Base.Position - Vector3.new(0,10,0))
  367. local part, position = workspace:FindPartOnRay(ray, owner.Character, false, true)
  368. if (owner.Character.Torso.Position - position).magnitude < 3 then
  369. owner.Character.Torso.Velocity = Vector3.new(0,400,0)
  370. end
  371. end
  372. if string.byte(k) == 48 then
  373. print("fAST!")
  374. shift = true
  375. end
  376. if string.byte(k) == 50 then
  377. local mhp = mouse.Hit.p
  378. local t = mouse.Target
  379. if lcombat then
  380. local mode = "disable"
  381. remote:FireServer(mode,mhp,t)
  382. lcombat = false
  383. else
  384. local mode = "enable"
  385. remote:FireServer(mode,mhp,t)
  386. lcombat = true
  387. end
  388. end
  389. end)
  390. mouse.Button1Down:Connect(function()
  391. local mhp = mouse.Hit.p
  392. local t = mouse.Target
  393. local mode = "Lclimb"
  394. end)
  395. mouse.Button2Down:Connect(function()
  396. local mhp = mouse.Hit.p
  397. local t = mouse.Target
  398. local mode = "Rclimb"
  399. end)
  400. mouse.Button1Up:Connect(function()
  401. local mhp = mouse.Hit.p
  402. local t = mouse.Target
  403. local mode = "Lunclimb"
  404. end)
  405. mouse.Button2Up:Connect(function()
  406. local mhp = mouse.Hit.p
  407. local t = mouse.Target
  408. local mode = "Runclimb"
  409. end)
  410. mouse.KeyUp:Connect(function(k)
  411. if k == "w" and forward then
  412. forward = false
  413. end
  414. if k == "a" and left then
  415. left = false
  416. end
  417. if k == "s" and backward then
  418. backward = false
  419. end
  420. if k == "d" and right then
  421. right = false
  422. end
  423. if string.byte(k) == 48 then
  424. shift = false
  425. end
  426. end)
  427. local torso = owner.Character.Torso
  428. local larm = owner.Character["Left Arm"]
  429. local rarm = owner.Character["Right Arm"]
  430. local lleg = owner.Character["Left Leg"]
  431. local rleg = owner.Character["Right Leg"]
  432. local head = owner.Character.Head
  433. local larmsize = larm.Size
  434. local rarmsize = rarm.Size
  435. local llegsize = lleg.Size
  436. local rlegsize = rleg.Size
  437. local headsize = head.Size
  438. game:GetService("RunService").Heartbeat:Connect(function()
  439. local mhp = mouse.Hit.p
  440. local t = mouse.Target
  441. if humanoid.Health > 0 then
  442. rotator.AngularVelocity = Vector3.new(humanoid.MoveDirection.Z*16,0,humanoid.MoveDirection.X*-16)
  443. vector3 = Vector3.new()
  444. local mode = speed/100
  445. remote:FireServer(mode,mhp,t)
  446. if shift and speed <= 500 then
  447. local mode = "speedup"
  448. speed = speed + 0.5
  449. if speed > 500 then
  450. speed = 500
  451. end
  452. if cam.FieldOfView < 120 then
  453. cam.FieldOfView = cam.FieldOfView + 0.25
  454. end
  455. else
  456. if speed > 50 then
  457. local mode = "slowdown"
  458. speed = speed - 2.5
  459. remote:FireServer(mode,mhp,t)
  460. end
  461. if cam.FieldOfView > 70 then
  462. cam.FieldOfView = cam.FieldOfView - 0.5
  463. if cam.FieldOfView < 70 then
  464. cam.FieldOfView = 70
  465. end
  466. end
  467. end
  468. if xtreme then
  469. speed = 1000
  470. torso.RotVelocity = Vector3.new(humanoid.MoveDirection.Z*speed,0,humanoid.MoveDirection.X*-speed)
  471. end
  472. if forward and not backward then
  473. rotator.Parent = torso
  474. vector3 = vector3 + cam.CFrame.LookVector * speed
  475. torso.RotVelocity = Vector3.new(humanoid.MoveDirection.Z*speed,0,humanoid.MoveDirection.X*-speed)
  476. torso.Velocity = vector3
  477. end
  478. if left then
  479. rotator.Parent = torso
  480. vector3 = vector3 + cam.CFrame.RightVector * -speed
  481. torso.RotVelocity = Vector3.new(humanoid.MoveDirection.Z*speed,0,humanoid.MoveDirection.X*-speed)
  482. torso.Velocity = vector3
  483. end
  484. if right then
  485. rotator.Parent = torso
  486. vector3 = vector3 + cam.CFrame.RightVector * speed
  487. torso.RotVelocity = Vector3.new(humanoid.MoveDirection.Z*speed,0,humanoid.MoveDirection.X*-speed)
  488. torso.Velocity = vector3
  489. end
  490. if backward then
  491. rotator.Parent = torso
  492. vector3 = vector3 + cam.CFrame.LookVector * -speed
  493. torso.RotVelocity = Vector3.new(humanoid.MoveDirection.Z*speed,0,humanoid.MoveDirection.X*-speed)
  494. torso.Velocity = vector3
  495. end
  496. if not forward and not backward and not left and not right then
  497. rotator.Parent = nil
  498. local mode = "notmoving"
  499.  
  500. elseif forward and backward and left and right then
  501. local mode = "moving"
  502.  
  503. end
  504. else
  505. mode = "dead"
  506. end
  507. end)
  508.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement