Advertisement
samuelrichter66

POWAH

May 27th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.76 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153.  
  154.  
  155.  
  156. repeat wait() until game:service'Players'.LocalPlayer.Character
  157. --[[
  158.  
  159. - Added new color scheme.
  160. - Some minor edits.
  161. - New engine type, for your faster speed requirements.
  162. - Camera bug fix.
  163. ]]--
  164. do --CFrame lerp
  165. local function QuaternionFromCFrame(cf)
  166. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  167. local trace = m00 + m11 + m22
  168. if trace > 0 then
  169. local s = math.sqrt(1 + trace)
  170. local recip = 0.5/s
  171. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  172. else
  173. local i = 0
  174. if m11 > m00 then
  175. i = 1
  176. end
  177. if m22 > (i == 0 and m00 or m11) then
  178. i = 2
  179. end
  180. if i == 0 then
  181. local s = math.sqrt(m00-m11-m22+1)
  182. local recip = 0.5/s
  183. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  184. elseif i == 1 then
  185. local s = math.sqrt(m11-m22-m00+1)
  186. local recip = 0.5/s
  187. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  188. elseif i == 2 then
  189. local s = math.sqrt(m22-m00-m11+1)
  190. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  191. end
  192. end
  193. end
  194. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  195. local xs, ys, zs = x + x, y + y, z + z
  196. local wx, wy, wz = w*xs, w*ys, w*zs
  197. local xx = x*xs
  198. local xy = x*ys
  199. local xz = x*zs
  200. local yy = y*ys
  201. local yz = y*zs
  202. local zz = z*zs
  203. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  204. end
  205. local function QuaternionSlerp(a, b, t)
  206. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  207. local startInterp, finishInterp;
  208. if cosTheta >= 0.0001 then
  209. if (1 - cosTheta) > 0.0001 then
  210. local theta = math.acos(cosTheta)
  211. local invSinTheta = 1/math.sin(theta)
  212. startInterp = math.sin((1-t)*theta)*invSinTheta
  213. finishInterp = math.sin(t*theta)*invSinTheta
  214. else
  215. startInterp = 1-t
  216. finishInterp = t
  217. end
  218. else
  219. if (1+cosTheta) > 0.0001 then
  220. local theta = math.acos(-cosTheta)
  221. local invSinTheta = 1/math.sin(theta)
  222. startInterp = math.sin((t-1)*theta)*invSinTheta
  223. finishInterp = math.sin(t*theta)*invSinTheta
  224. else
  225. startInterp = t-1
  226. finishInterp = t
  227. end
  228. end
  229. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  230. end
  231. function clerp(a,b,t)
  232. local qa = {QuaternionFromCFrame(a)}
  233. local qb = {QuaternionFromCFrame(b)}
  234. local ax, ay, az = a.x, a.y, a.z
  235. local bx, by, bz = b.x, b.y, b.z
  236. local _t = 1-t
  237. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  238. end
  239.  
  240. end
  241.  
  242. plr = game:service'Players'.LocalPlayer
  243. char = plr.Character
  244. mouse = plr:GetMouse()
  245. humanoid = char:findFirstChild("Humanoid")
  246. torso = char:findFirstChild("Torso")
  247. head = char.Head
  248. ra = char:findFirstChild("Right Arm")
  249. la = char:findFirstChild("Left Arm")
  250. rl = char:findFirstChild("Right Leg")
  251. ll = char:findFirstChild("Left Leg")
  252. rs = torso:findFirstChild("Right Shoulder")
  253. ls = torso:findFirstChild("Left Shoulder")
  254. rh = torso:findFirstChild("Right Hip")
  255. lh = torso:findFirstChild("Left Hip")
  256. neck = torso:findFirstChild("Neck")
  257. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  258. anim = char:findFirstChild("Animate")
  259. rootpart = char:findFirstChild("HumanoidRootPart")
  260. camera = workspace.CurrentCamera
  261. modelforparts = char:findFirstChild("ModelForParts") or Instance.new("Model", char)
  262. modelforparts.Name = "ModelForParts"
  263. equipped = false
  264. local MAXSPEED = 90
  265. local SPEED = 0
  266. bg = Instance.new("BodyGyro")
  267. bg.maxTorque = Vector3.new(9e6,9e6,9e6)
  268. bg.D = 800
  269. bv = Instance.new("BodyVelocity")
  270. bv.maxForce = Vector3.new(9e6,9e6,9e6)
  271.  
  272. local sound = Instance.new("Sound", head)
  273. sound.Volume = 1
  274. sound.Pitch = 2
  275. sound.SoundId = "http://www.roblox.com/asset/?id=142782429"
  276. sound.Looped = true
  277. wait()
  278. sound:play()
  279.  
  280.  
  281. ColorScheme1 = BrickColor.new(106)
  282. ColorScheme2 = BrickColor.new(40)
  283. ColorScheme3 = BrickColor.new(199)
  284. ANGLE = 0
  285. equipped = true
  286.  
  287. rs.Parent = nil
  288. ls.Parent = nil
  289. rh.Parent = nil
  290. lh.Parent = nil
  291. anim.Parent = nil
  292. wait()
  293. local rm = Instance.new("Weld", modelforparts)
  294. rm.C0 = CFrame.new(1.5, 0.5, 0)
  295. rm.C1 = CFrame.new(0, 0.5, 0)
  296. rm.Part0 = torso
  297. rm.Part1 = ra
  298. local lm = Instance.new("Weld", modelforparts)
  299. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  300. lm.C1 = CFrame.new(0, 0.5, 0)
  301. lm.Part0 = torso
  302. lm.Part1 = la
  303. local rlegm = Instance.new("Weld", modelforparts)
  304. rlegm.C0 = CFrame.new(0.5, -1, 0)
  305. rlegm.C1 = CFrame.new(0, 1, 0)
  306. rlegm.Part0 = torso
  307. rlegm.Part1 = rl
  308. local llegm = Instance.new("Weld", modelforparts)
  309. llegm.C0 = CFrame.new(-0.5, -1, 0)
  310. llegm.C1 = CFrame.new(0, 1, 0)
  311. llegm.Part0 = torso
  312. llegm.Part1 = ll
  313.  
  314. --grey part
  315. local part = Instance.new("Part", modelforparts)
  316. part.Size = Vector3.new(2.2, .85, 2.2)
  317. part.FormFactor = 'Custom'
  318. part.BrickColor = ColorScheme3
  319. part.Locked = true
  320. part.TopSurface = 10
  321. part.BottomSurface = 10
  322. part.LeftSurface = 10
  323. part.RightSurface = 10
  324. part.FrontSurface = 10
  325. part.BackSurface = 10
  326. part:breakJoints()
  327. part.Material = "SmoothPlastic"
  328. part.CanCollide = false
  329. Instance.new("CylinderMesh", part)
  330. local weld = Instance.new("Weld", part)
  331. weld.Part0 = part
  332. weld.Part1 = torso
  333. weld.C1 = CFrame.new(0, -2.1, 0)
  334. weld.C0 = CFrame.Angles(math.pi/2, math.pi/2, 0) * CFrame.new(0, 0, .95)
  335. --orange part
  336. local part2 = part:clone()
  337. part2.Parent = modelforparts
  338. part2.Size = Vector3.new(2.5, 1.05, 2.5)
  339. part2.BrickColor = ColorScheme1
  340. local wld2 = Instance.new("Weld", part)
  341. wld2.Part0 = part2
  342. wld2.Part1 = part
  343. wld2.C1 = CFrame.new()
  344. wld2.C0 = CFrame.new()
  345. --white part
  346. local part3 = part:clone()
  347. part3.Parent = modelforparts
  348. part3.Size = Vector3.new(2.62, .5, 2.62)
  349. part3.BrickColor = ColorScheme2
  350. local wld3 = Instance.new("Weld", part)
  351. wld3.Part0 = part3
  352. wld3.Part1 = part
  353. wld3.C1 = CFrame.new()
  354. wld3.C0 = CFrame.new()
  355. --airblower
  356. local airblowercyl = part:clone()
  357. airblowercyl.Parent = modelforparts
  358. airblowercyl.Size = Vector3.new(.95, 3.5, .95)
  359. airblowercyl.BrickColor = ColorScheme3
  360. local smoke = Instance.new("Smoke", airblowercyl)
  361. smoke.Color = Color3.new(.3, .3, .3)
  362. smoke.RiseVelocity = 10
  363. smoke.Opacity = .1
  364. local cwld = Instance.new("Weld", airblowercyl)
  365. cwld.Part0 = airblowercyl
  366. cwld.Part1 = part
  367. cwld.C1 = CFrame.Angles(0, 0, -math.pi/2)
  368. cwld.C0 = CFrame.new(0, -1.85-0.925, -.6) * CFrame.Angles(math.pi/14, 0, 0)
  369.  
  370. --handles
  371. local hndl = part:clone()
  372. hndl.Parent = modelforparts
  373. hndl.Size = Vector3.new(.2, .4, .2)
  374. hndl.BrickColor = BrickColor.new(26)
  375. hndl.Mesh:Destroy()
  376. local hwld = Instance.new("Weld", hndl)
  377. hwld.Part1 = part
  378. hwld.Part0 = hndl
  379. hwld.C1 = CFrame.new(.1, 0, 0) * CFrame.Angles(math.pi/2, 0, 0)
  380. hwld.C0 = CFrame.new(0, -.82 - .4, 0)
  381. Instance.new("BlockMesh", hndl).Scale = Vector3.new(.5, 1, .5)
  382. local hndl2 = hndl:clone()
  383. hndl2.Parent = modelforparts
  384. hndl2.Size = Vector3.new(.8, .2, .2)
  385. local hwld2 = Instance.new("Weld", hndl2)
  386. hwld2.Part0 = hndl2
  387. hwld2.Part1 = part
  388. hwld2.C1 = CFrame.new(-.25, 0, 0) * CFrame.Angles(math.pi/2, 0, 0)
  389. hwld2.C0 = CFrame.new(0, -1 - .4, 0)
  390. hndl2.Mesh.Scale = Vector3.new(1, .5, .5)
  391. local hndl3 = hndl:clone()
  392. hndl3.Parent = modelforparts
  393. hndl3.Size = Vector3.new(.2, .4, .2)
  394. local hwld3 = Instance.new("Weld", hndl3)
  395. hwld3.Part0 = hndl3
  396. hwld3.Part1 = part
  397. hwld3.C1 = CFrame.new(-.6, 0, 0) * CFrame.Angles(math.pi/2, 0, 0)
  398. hwld3.C0 = CFrame.new(0, -.82 - .4, 0)
  399. --balloon ropes
  400. local blnrope = part:clone()
  401. blnrope.Parent = modelforparts
  402. blnrope.Size = Vector3.new(.2, 3.8, .2)
  403. blnrope.BrickColor = BrickColor.new(1)
  404. blnrope.Mesh:Destroy()
  405. local blnwld = Instance.new("Weld", blnrope)
  406. blnwld.Part0 = blnrope
  407. blnwld.Part1 = airblowercyl
  408. blnwld.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2, math.pi/7, -math.pi/8)
  409. blnwld.C0 = CFrame.new(0, -2, 0)
  410. Instance.new("BlockMesh", blnrope).Scale = Vector3.new(.2, 1, .2)
  411. local blnrope2 = blnrope:clone()
  412. blnrope2.Parent = modelforparts
  413. blnrope2.Size = Vector3.new(.2, 4, .2)
  414. local blnwld2 = Instance.new("Weld", blnrope2)
  415. blnwld2.Part0 = blnrope2
  416. blnwld2.Part1 = airblowercyl
  417. blnwld2.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2, math.pi/4, -math.pi/74)
  418. blnwld2.C0 = CFrame.new(0, -2.2, 0)
  419. local blnrope3 = blnrope:clone()
  420. blnrope3.Parent = modelforparts
  421. local blnwld3 = Instance.new("Weld", blnrope3)
  422. blnwld3.Part0 = blnrope3
  423. blnwld3.Part1 = airblowercyl
  424. blnwld3.C0 = CFrame.new(0, -2, 0)
  425.  
  426.  
  427. --Stored balloon rope welds
  428. blnwldC1 = blnwld.C1
  429. blnwld2C1 = blnwld2.C1
  430. blnwld3C1 = blnwld3.C1
  431. --balloons
  432. local bln = part:clone()
  433. bln.Parent = modelforparts
  434. bln.Size = Vector3.new(1.65, 1.8, 1.65)
  435. bln.BrickColor = BrickColor.new(119)
  436. bln.Mesh:Destroy()
  437. bln.Transparency = .1
  438. local balnwld = Instance.new("Weld", bln)
  439. balnwld.Part0 = bln
  440. balnwld.Part1 = blnrope
  441. balnwld.C1 = CFrame.new(0, 0, 0)
  442. balnwld.C0 = CFrame.new(0, -2.6, 0)
  443. Instance.new("SpecialMesh", bln).MeshType = "Sphere"
  444. local bln2 = bln:clone()
  445. bln2.Parent = modelforparts
  446. bln2.BrickColor = BrickColor.new(23)
  447. local balnwld2 = Instance.new("Weld", bln2)
  448. balnwld2.Part0 = bln2
  449. balnwld2.Part1 = blnrope2
  450. balnwld2.C1 = CFrame.new(0, 0, 0)
  451. balnwld2.C0 = CFrame.new(0, -2.8, 0)
  452. local bln3 = bln:clone()
  453. bln3.Parent = modelforparts
  454. bln3.BrickColor = BrickColor.new(21)
  455. local balnwld3 = Instance.new("Weld", bln3)
  456. balnwld3.Part0 = bln3
  457. balnwld3.Part1 = blnrope3
  458. balnwld3.C0 = CFrame.new(0, -2.6, 0)
  459.  
  460. --Controls
  461. bg.Parent = rootpart
  462. bv.Parent = rootpart
  463. forwards = false
  464. backwards = false
  465. mouse.KeyDown:connect(function(k)
  466. if k == "w" then
  467. forwards = true
  468. coroutine.wrap(function()
  469. while forwards do wait()
  470. if SPEED >= MAXSPEED then SPEED = MAXSPEED forwards = false break end
  471. sound.Volume = sound.Volume + .05
  472. if sound.Volume >= .5 then sound.Volume = .5 end
  473. SPEED = SPEED + 5
  474. end
  475. end)()
  476. end
  477. end)
  478. mouse.KeyUp:connect(function(k)
  479. if k == "w" then
  480. forwards = false
  481. coroutine.wrap(function()
  482. while SPEED >= 0 do wait()
  483. sound.Volume = sound.Volume - .05
  484. if sound.Volume <= 0.25 then sound.Volume = 0.25 end
  485. SPEED = SPEED - 5
  486. if forward then break end
  487. if SPEED <= 0 then SPEED = 0 break end
  488. end
  489. end)()
  490. end
  491. end)
  492. --BALLONS MOOOOVEEE :DDD
  493. game:service'RunService'.RenderStepped:connect(function()
  494. if not equipped then return end
  495. blnwldC1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2 - math.rad(SPEED/1.7) + math.sin(ANGLE)*.025, math.pi/7 + math.sin(ANGLE)*.105, -math.pi/8 - math.sin(ANGLE)*.018)
  496. blnwld2C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2 - math.rad(SPEED/1.7) + math.sin(ANGLE)*.015, math.pi/4 - math.sin(ANGLE)*.065, -math.pi/74 + math.sin(ANGLE)*.021)
  497. blnwld3C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.pi/2 - math.rad(SPEED/1.7) - math.sin(ANGLE)*.02, math.pi/16 - math.sin(ANGLE)*.125, math.pi/9 - math.sin(ANGLE)*.078)
  498. blnwld.C1 = clerp(blnwld.C1, blnwldC1, 0.05)
  499. blnwld2.C1 = clerp(blnwld2.C1, blnwld2C1, 0.05)
  500. blnwld3.C1 = clerp(blnwld3.C1, blnwld3C1, 0.05)
  501. end)
  502.  
  503. --positioning welds
  504. lm.C0 = CFrame.new(-1.25, .05, -.5) * CFrame.Angles(math.rad(35), 0, math.rad(45))
  505. rm.C0 = CFrame.new(1.25, .05, -.5) * CFrame.Angles(math.rad(35), 0, -math.rad(45))
  506. llegm.C0 = CFrame.new(-0.5, -1, 0) * CFrame.Angles(0, 0, -math.rad(15))
  507. rlegm.C0 = CFrame.new(0.5, -1, 0) * CFrame.Angles(0, 0, math.rad(15))
  508.  
  509.  
  510.  
  511. game:service'RunService'.RenderStepped:connect(function()
  512. for i,v in pairs(torso:children()) do if v and v:IsA'BodyGyro' then v:Destroy() end end
  513. ANGLE = (ANGLE % 360) + math.random(1, 10)/100
  514. humanoid.PlatformStand = true
  515. local rotpos = Vector3.new(camera.CoordinateFrame.x, camera.CoordinateFrame.y, camera.CoordinateFrame.z)
  516. bg.cframe = CFrame.new(torso.Position,rotpos) * CFrame.Angles(0, math.pi, 0)
  517. bv.velocity = (torso.CFrame * CFrame.Angles(math.pi/14, 0, 0)).lookVector * SPEED
  518. end)
  519.  
  520.  
  521.  
  522.  
  523. --[[ Time Testing ]]--
  524. -------------------------------------------------------
  525. --[[
  526.  
  527. This script was created by WafflesAreVeryGood.
  528. ATTACKS
  529. _______
  530.  
  531.  
  532. --]]
  533. -------------------------------------------------------
  534. print("This script was created by WafflesAreVeryGood!")
  535. --[[Changeable Variables]]--
  536. local multiplier = 1 --Attack multiplier (default is 1)
  537. local soundlist = {
  538. HardHit1 = "rbxassetid://565207203",
  539. HardHit2 = "rbxassetid://541909913",
  540. HardHit3 = "rbxassetid://541909983",
  541. WeakHit1 = "rbxassetid://558642292",
  542. WeakHit2 = "rbxassetid://541907812",
  543. Slice1 = "rbxassetid://260429964",
  544. Slice2 = "rbxassetid://260430015",
  545. Explosion1 = "rbxassetid://138186576",
  546. Explosion2 = "rbxassetid://157878578",
  547. Woosh1 = "rbxassetid://541909867",
  548. Woosh2 = "rbxassetid://541909763",
  549. TimeSlow = "rbxassetid://615678808",
  550. TimeStop = "rbxassetid://926382097",
  551. TimeResume = "rbxassetid://894793352",
  552. TimeFast = "rbxassetid://743499393",
  553. TimeReverse = "rbxassetid://618737332",
  554.  
  555. }
  556.  
  557. --[[Important Variables]]--
  558. local plr = game:GetService('Players').LocalPlayer
  559. local char = plr.Character
  560. local mouse = plr:GetMouse()
  561. local input = game:GetService('UserInputService')
  562. ----
  563. local joints = {"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}
  564. local torso,head,rootpart = char.Torso,char.Head,char.HumanoidRootPart
  565. local rs = torso["Right Shoulder"]
  566. local ls = torso["Left Shoulder"]
  567. local rh = torso["Right Hip"]
  568. local lh = torso["Left Hip"]
  569. local neck = torso.Neck
  570. local rj = rootpart["RootJoint"]
  571. ----
  572. local huge = Vector3.new(math.huge, math.huge, math.huge)
  573. local attacking = false
  574. local cananim = true
  575. local timestop = false
  576. local timeslow = false
  577. local timefast = false
  578. local reversing = false
  579. local unfreeze = {}
  580. local sounddata = {}
  581. local connections = {}
  582. local healthstuff = {}
  583.  
  584. --[[ Functions ]]--
  585. function addattack(keycode, func)
  586. input.InputBegan:connect(function(inp)
  587. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  588. func()
  589. end
  590. end)
  591. end
  592. function attackend(keycode, func)
  593. input.InputEnded:connect(function(inp)
  594. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  595. func()
  596. end
  597. end)
  598. end
  599. function swait(t)
  600. if t then
  601. for i = 0, t do
  602. game:GetService('RunService').Stepped:wait(0)
  603. end
  604. else
  605. game:GetService('RunService').Stepped:wait(0)
  606. end
  607. return true
  608. end
  609. function fade(obj, dest, grow)
  610. spawn(function()
  611. local oldcf = obj.CFrame
  612. for i = 0, 10 do
  613. if grow then
  614. obj.Size = obj.Size +Vector3.new(1,1,1)
  615. obj.CFrame = oldcf
  616. end
  617. obj.Transparency = obj.Transparency +0.1
  618. swait()
  619. end
  620. if dest then
  621. obj:Destroy()
  622. end
  623. end)
  624. end
  625. function replacejoint(name)
  626. local j = torso:FindFirstChild(name)
  627. if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  628. if j then
  629. if true then
  630. local already = j.Parent:FindFirstChild(j.Name.." Replacement")
  631. local new = Instance.new("Weld")
  632. local c0 = j.C0
  633. local c1 = j.C1
  634. new.Part0 = j.Part0
  635. j.Part0 = nil
  636. new.Name = j.Name.." Replacement"
  637. if already then c0 = already.C0 c1 = already.C1 already:Destroy() end
  638. new.Parent = j.Parent
  639. new.Part1 = j.Part1
  640. new.C0 = c0
  641. new.C1 = c1
  642. return new
  643. end
  644. end
  645. end
  646. function removejoint(name, fast)
  647. local j = torso:FindFirstChild(name.." Replacement")
  648. if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  649. if j then
  650. local p0 = j.Part0
  651. if p0 ~= nil then
  652. local c0 = j.C0
  653. local c1 = j.C1
  654. j:Destroy()
  655. local new = p0:FindFirstChild(name)
  656. local ac0 = new.C0
  657. local ac1 = new.C1
  658. new.Part0 = p0
  659. new.C0 = c0
  660. new.C1 = c1
  661. spawn(function()
  662. if name ~= "RootJoint" then
  663. if not fast then
  664. for i = 0, 0.6, 0.1 do
  665. new.C0 = new.C0:Lerp(ac0, 0.5)
  666. new.C1 = new.C1:lerp(ac1, 0.5)
  667. swait()
  668. end
  669. else
  670. new.C0 = new.C0:Lerp(ac0, 1)
  671. new.C1 = new.C1:lerp(ac1, 1)
  672. end
  673. end
  674. end)
  675. end
  676. end
  677. end
  678. function fixalljoints(fast)
  679. for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}) do
  680. removejoint(v, fast)
  681. end
  682. end
  683. function getnewjoints()
  684. local rs = replacejoint("Right Shoulder")
  685. local ls = replacejoint("Left Shoulder")
  686. local rh = replacejoint("Right Hip")
  687. local lh = replacejoint("Left Hip")
  688. local neck = replacejoint("Neck")
  689. local rj = replacejoint("RootJoint")
  690. return rs,ls,rh,lh,neck,rj
  691. end
  692. function knockback(hit, force)
  693. local bv = Instance.new("BodyVelocity")
  694. bv.MaxForce = huge
  695. bv.Velocity = force
  696. bv.Parent = hit
  697. game:GetService('Debris'):AddItem(bv, 0.15)
  698. end
  699. function soundeffect(id, volume, speed, parent, forcewait)
  700. local func = function()
  701. local s = LoadLibrary("RbxUtility").Create("Sound")()
  702. s.Name = "SoundEffect"
  703. s.Volume = volume
  704. s.PlaybackSpeed = speed
  705. s.SoundId = id
  706. s.Name = "dont"
  707. s.Looped = false
  708. s.Parent = parent
  709. s:Play()
  710. repeat wait() until not s.Playing
  711. s:Destroy()
  712. end
  713. if forcewait then
  714. func()
  715. else
  716. spawn(func)
  717. end
  718. end
  719. function getascendants(obj)
  720. local par = obj
  721. local ret = {}
  722. pcall(function()
  723. repeat
  724. par = par.Parent
  725. if par ~= nil then
  726. table.insert(ret, par)
  727. end
  728. until par == nil
  729. end)
  730. return ret
  731. end
  732. function findascendant(obj, class)
  733. local par = obj
  734. local ret = nil
  735. pcall(function()
  736. repeat
  737. par = par.Parent
  738. if par:IsA(class) then
  739. ret = par
  740. break
  741. end
  742. until par == nil
  743. end)
  744. return ret
  745. end
  746. function hurt(hit, dmg)
  747. --pcall(function()
  748. local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  749. if hum then
  750. if hum.Parent ~= char then
  751. hum.Health = hum.Health - dmg
  752. hum.Health = hum.Health - dmg
  753. soundeffect(soundlist.Headshot, 1.5, 1, workspace.CurrentCamera)
  754. return true
  755. end
  756. end
  757. --end)
  758. end
  759. --[[ Actual script :OOOOOOOOOO ]]--
  760. addattack(Enum.KeyCode.G, function()
  761. if not timeslow and not timefast and not reversing then
  762. local p = Instance.new("Part")
  763. p.Anchored = true
  764. p.Material = "Glass"
  765. p.Size = Vector3.new(0.1,0.1,0.1)
  766. p.BrickColor = BrickColor.new("Toothpaste")
  767. p.CanCollide = false
  768. p.CFrame = char.HumanoidRootPart.CFrame
  769. local m = Instance.new("SpecialMesh")
  770. m.MeshType = "Sphere"
  771. m.Parent = p
  772. p.Parent = char
  773. spawn(function()
  774. for i = 1, 50 do
  775. p.Transparency = i/50
  776. p.Size = p.Size:Lerp(Vector3.new(40,40,40),0.1)
  777. p.CFrame = char.HumanoidRootPart.CFrame
  778. swait()
  779. end
  780. p:Destroy()
  781. end)
  782. if not timestop then
  783. local s = Instance.new("Sound")
  784. s.Volume = 3
  785. s.Name = "dont"
  786. s.SoundId = soundlist.TimeStop
  787. s.Parent = char
  788. s:Play()
  789. dcon = workspace.DescendantAdded:connect(function(obj)
  790. pcall(function()
  791. swait()
  792. local ok = true
  793. for i,v in pairs(getascendants(obj)) do
  794. if v.Name:lower():find("ignoremodel") then
  795. ok = false
  796. end
  797. end
  798. if obj:IsA("BasePart") and ok and not findascendant(obj, "Tool") and not findascendant(obj, "HopperBin") and not findascendant(obj, "Camera") then
  799. if not obj.Anchored and obj.Name ~= "HumanoidRootPart" then
  800. table.insert(unfreeze, obj)
  801. obj.Anchored = true
  802. end
  803. end
  804. if obj:IsA("Sound") and obj.Name ~= "dont" then
  805. if obj.Playing then
  806. obj:Pause()
  807. table.insert(unfreeze, obj)
  808. end
  809. end
  810. if obj:IsA("Humanoid") then
  811. local last = obj.Health
  812. local always = last
  813. local con = obj.HealthChanged:connect(function(health)
  814. if last-health > 0 then
  815. table.insert(healthstuff, {hum = obj, change = last-health})
  816. end
  817. last = health
  818. obj.Health = always
  819. end)
  820. table.insert(connections, con)
  821. end
  822. end)
  823. end)
  824. for i,v in pairs(workspace:GetDescendants()) do
  825. pcall(function()
  826. if v:IsA("BasePart") then
  827. local ok = true
  828. for i,e in pairs(getascendants(v)) do
  829. if e.Name:lower():find("ignore_model") then
  830. ok = false
  831. end
  832. if e:IsA("Camera") then
  833. ok = false
  834. end
  835. end
  836. if not v.Anchored and ok and v.Parent ~= char and not findascendant(v, "Camera") and not findascendant(v, "Tool") and not findascendant(v, "HopperBin") then
  837. local ok = true
  838. if v.Parent:IsA("Accessory") then ok = false end
  839. if ok and v.Name ~= "HumanoidRootPart" then
  840. v.Anchored = true
  841. table.insert(unfreeze, v)
  842. end
  843. end
  844. end
  845. end)
  846. pcall(function()
  847. if v:IsA("Sound") and v.Name ~= "dont" then
  848. if v.Playing then
  849. v:Pause()
  850. table.insert(unfreeze, v)
  851. end
  852. end
  853. end)
  854. pcall(function()
  855. if v:IsA("Humanoid") then
  856. local last = v.Health
  857. local always = last
  858. local con = v.HealthChanged:connect(function(health)
  859. if last-health > 0 then
  860. table.insert(healthstuff, {hum = v, change = last-health})
  861. end
  862. last = health
  863. v.Health = always
  864. end)
  865. table.insert(connections, con)
  866. end
  867. end)
  868. end
  869. timestop = true
  870. local cor = Instance.new("ColorCorrectionEffect")
  871. cor.Name = "tstopef"
  872. cor.Parent = game:GetService('Lighting')
  873. for i = 1, 50 do
  874. cor.Saturation = Vector3.new(cor.Saturation,0,0):Lerp(Vector3.new(-5,0,0), 0.05).X
  875. swait()
  876. end
  877. game.Debris:AddItem(s, 2)
  878. else
  879. local s = Instance.new("Sound")
  880. s.Volume = 7
  881. s.Name = "dont"
  882. s.SoundId = soundlist.TimeResume
  883. s.Parent = char
  884. s:Play()
  885. local cor = game:GetService('Lighting'):FindFirstChild("tstopef")
  886. if cor then
  887. for i = 1, 50 do
  888. cor.Saturation = Vector3.new(cor.Saturation,0,0):Lerp(Vector3.new(0,0,0), 0.05).X
  889. swait()
  890. end
  891. cor:Destroy()
  892. end
  893. game.Debris:AddItem(s, 2)
  894. timestop = false
  895. for i,v in pairs(unfreeze) do
  896. pcall(function()
  897. v.Anchored = false
  898. end)
  899. pcall(function()
  900. v:Resume()
  901. end)
  902. end
  903. for i,v in pairs(connections) do
  904. pcall(function()
  905. v:disconnect()
  906. end)
  907. end
  908. for i,v in pairs(healthstuff) do
  909. pcall(function()
  910. local hum = v.hum
  911. hum.Health = hum.Health - v.change
  912. if hum.Parent:FindFirstChild("Health") then
  913. pcall(function()
  914. hum.Parent.Health.Disabled = false
  915. end)
  916. end
  917. end)
  918. end
  919. pcall(function()
  920. dcon:disconnect()
  921. end)
  922. healthstuff = {}
  923. unfreeze = {}
  924. end
  925. end
  926. end)
  927. local humanoiddata = {}
  928. local bodymoverdata = {}
  929. local dcon2
  930. local connectionsdata = {}
  931. addattack(Enum.KeyCode.H, function()
  932. if not timeslow and not timestop and not reversing then
  933. local p = Instance.new("Part")
  934. p.Anchored = true
  935. p.Material = "Glass"
  936. p.Size = Vector3.new(0.1,0.1,0.1)
  937. p.BrickColor = BrickColor.new("Toothpaste")
  938. p.CanCollide = false
  939. p.CFrame = char.HumanoidRootPart.CFrame
  940. local m = Instance.new("SpecialMesh")
  941. m.MeshType = "Sphere"
  942. m.Parent = p
  943. p.Parent = char
  944. spawn(function()
  945. for i = 1, 50 do
  946. p.Transparency = i/50
  947. p.Size = p.Size:Lerp(Vector3.new(40,40,40),0.1)
  948. p.CFrame = char.HumanoidRootPart.CFrame
  949. swait()
  950. end
  951. p:Destroy()
  952. end)
  953. if not timefast then
  954. timefast = true
  955. soundeffect(soundlist.TimeFast, 1.5, 1, char)
  956. for i,v in pairs(workspace:GetDescendants()) do
  957. if v:IsA("Humanoid") then
  958. table.insert(humanoiddata, {Hum = v, WS = v.WalkSpeed, JP = v.JumpPower})
  959. for _,track in pairs(v:GetPlayingAnimationTracks()) do
  960. end
  961. local con = v.AnimationPlayed:connect(function(track)
  962. end)
  963. table.insert(connections, con)
  964. end
  965. if v:IsA("BodyVelocity") then
  966. table.insert(bodymoverdata, {Mover = v, Vel = v.Velocity})
  967. end
  968. if v:IsA("BodyPosition") then
  969. table.insert(bodymoverdata, {Mover = v, Vel = v.P})
  970. end
  971. if v.Name == "HumanoidRootPart" and v:IsA("BasePart") then
  972. end
  973. if v:IsA("Sound") and v.Name ~= "dont" then
  974. table.insert(sounddata, {Sound = v, Speed = v.PlaybackSpeed})
  975. end
  976. end
  977. dcon2 = workspace.DescendantAdded:connect(function(v)
  978. swait(2)
  979. if v:IsA("Humanoid") then
  980. table.insert(humanoiddata, {Hum = v, WS = v.WalkSpeed, JP = v.JumpPower})
  981. for _,track in pairs(v:GetPlayingAnimationTracks()) do
  982. track:AdjustSpeed(1.4)
  983. end
  984. local con = v.AnimationPlayed:connect(function(track)
  985. track:AdjustSpeed(1.4)
  986. end)
  987. table.insert(connections, con)
  988. end
  989. if v:IsA("BodyVelocity") then
  990. table.insert(bodymoverdata, {Mover = v, Vel = v.Velocity})
  991. end
  992. if v:IsA("BodyPosition") then
  993. table.insert(bodymoverdata, {Mover = v, Vel = v.P})
  994. end
  995. if v.Name == "HumanoidRootPart" and v:IsA("BasePart") then
  996. end
  997. if v:IsA("Sound") and v.Name ~= "dont" then
  998. table.insert(sounddata, {Sound = v, Speed = v.PlaybackSpeed})
  999. end
  1000. end)
  1001. else
  1002. timefast = false
  1003. soundeffect(soundlist.TimeResume, 1.5, 1, char)
  1004. for i,v in pairs(humanoiddata) do
  1005. pcall(function()
  1006. v["Hum"].WalkSpeed = v["WS"]
  1007. v["Hum"].JumpPower = v["JP"]
  1008. end)
  1009. end
  1010. for i,v in pairs(bodymoverdata) do
  1011. pcall(function()
  1012. if v["Mover"]:IsA("BodyVelocity") then
  1013. v["Mover"].Velocity = v["Vel"]
  1014. end
  1015. if v["Mover"]:IsA("BodyPosition") then
  1016. v["Mover"].P = v["Vel"]
  1017. end
  1018. end)
  1019. end
  1020. for i,v in pairs(sounddata) do
  1021. pcall(function()
  1022. v["Sound"].PlaybackSpeed = v["Speed"]
  1023. end)
  1024. end
  1025. for i,v in pairs(connections) do
  1026. pcall(function()
  1027. v:disconnect()
  1028. end)
  1029. end
  1030. connections = {}
  1031. pcall(function()
  1032. dcon2:disconnect()
  1033. end)
  1034. humanoiddata = {}
  1035. end
  1036. end
  1037. end)
  1038. local reversedata = {}
  1039. local saved = false
  1040. addattack(Enum.KeyCode.C, function()
  1041. if not timestop and not timeslow and not timefast then
  1042. if not saved then
  1043. saved = true
  1044. for i,v in pairs(workspace:GetDescendants()) do
  1045. end
  1046. else
  1047. reversing = true
  1048. saved = false
  1049. soundeffect(soundlist.TimeReverse, 2, 1, workspace)
  1050. for i = 1, 10 do
  1051. for _,v in pairs(reversedata) do
  1052. local obj = v.obj
  1053. local cf = v.cf obj.Anchored = true
  1054. end
  1055. end
  1056. swait()
  1057. end
  1058. char.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
  1059. reversedata = {}
  1060. reversing = false
  1061. end
  1062. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement