Advertisement
SHADOWCRAFTER666

sfsa

Oct 4th, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.24 KB | None | 0 0
  1. print("Loaded Successfully!")
  2. --[[Changeable Variables]]--
  3. local multiplier = 1 --Attack multiplier (default is 1)
  4. local soundlist = {
  5. HardHit1 = "rbxassetid://565207203",
  6. HardHit2 = "rbxassetid://541909913",
  7. HardHit3 = "rbxassetid://541909983",
  8. WeakHit1 = "rbxassetid://558642292",
  9. WeakHit2 = "rbxassetid://541907812",
  10. Slice1 = "rbxassetid://260429964",
  11. Slice2 = "rbxassetid://260430015",
  12. Explosion1 = "rbxassetid://138186576",
  13. Explosion2 = "rbxassetid://157878578",
  14. Woosh1 = "rbxassetid://541909867",
  15. Woosh2 = "rbxassetid://541909763",
  16. TimeSlow = "rbxassetid://615678808",
  17. TimeStop = "rbxassetid://926382097",
  18. TimeResume = "rbxassetid://894793352",
  19. TimeFast = "rbxassetid://743499393",
  20. TimeReverse = "rbxassetid://618737332",
  21.  
  22. }
  23.  
  24. --[[Important Variables]]--
  25. local plr = game:GetService('Players').LocalPlayer
  26. local char = plr.Character
  27. local mouse = plr:GetMouse()
  28. local input = game:GetService('UserInputService')
  29. ----
  30. local joints = {"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}
  31. local torso,head,rootpart = char.Torso,char.Head,char.HumanoidRootPart
  32. local rs = torso["Right Shoulder"]
  33. local ls = torso["Left Shoulder"]
  34. local rh = torso["Right Hip"]
  35. local lh = torso["Left Hip"]
  36. local neck = torso.Neck
  37. local rj = rootpart["RootJoint"]
  38. ----
  39. local huge = Vector3.new(math.huge, math.huge, math.huge)
  40. local attacking = false
  41. local cananim = true
  42. local timestop = false
  43. local timeslow = false
  44. local timefast = false
  45. local reversing = false
  46. local unfreeze = {}
  47. local sounddata = {}
  48. local connections = {}
  49. local healthstuff = {}
  50.  
  51. --[[ Functions ]]--
  52. function addattack(keycode, func)
  53. input.InputBegan:connect(function(inp)
  54. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  55. func()
  56. end
  57. end)
  58. end
  59. function attackend(keycode, func)
  60. input.InputEnded:connect(function(inp)
  61. if inp.KeyCode == keycode and not input:GetFocusedTextBox() then
  62. func()
  63. end
  64. end)
  65. end
  66. function swait(t)
  67. if t then
  68. for i = 0, t do
  69. game:GetService('RunService').Stepped:wait(0)
  70. end
  71. else
  72. game:GetService('RunService').Stepped:wait(0)
  73. end
  74. return true
  75. end
  76. function fade(obj, dest, grow)
  77. spawn(function()
  78. local oldcf = obj.CFrame
  79. for i = 0, 10 do
  80. if grow then
  81. obj.Size = obj.Size +Vector3.new(1,1,1)
  82. obj.CFrame = oldcf
  83. end
  84. obj.Transparency = obj.Transparency +0.1
  85. swait()
  86. end
  87. if dest then
  88. obj:Destroy()
  89. end
  90. end)
  91. end
  92. function replacejoint(name)
  93. local j = torso:FindFirstChild(name)
  94. if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  95. if j then
  96. if true then
  97. local already = j.Parent:FindFirstChild(j.Name.." Replacement")
  98. local new = Instance.new("Weld")
  99. local c0 = j.C0
  100. local c1 = j.C1
  101. new.Part0 = j.Part0
  102. j.Part0 = nil
  103. new.Name = j.Name.." Replacement"
  104. if already then c0 = already.C0 c1 = already.C1 already:Destroy() end
  105. new.Parent = j.Parent
  106. new.Part1 = j.Part1
  107. new.C0 = c0
  108. new.C1 = c1
  109. return new
  110. end
  111. end
  112. end
  113. function removejoint(name, fast)
  114. local j = torso:FindFirstChild(name.." Replacement")
  115. if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  116. if j then
  117. local p0 = j.Part0
  118. if p0 ~= nil then
  119. local c0 = j.C0
  120. local c1 = j.C1
  121. j:Destroy()
  122. local new = p0:FindFirstChild(name)
  123. local ac0 = new.C0
  124. local ac1 = new.C1
  125. new.Part0 = p0
  126. new.C0 = c0
  127. new.C1 = c1
  128. spawn(function()
  129. if name ~= "RootJoint" then
  130. if not fast then
  131. for i = 0, 0.6, 0.1 do
  132. new.C0 = new.C0:Lerp(ac0, 0.5)
  133. new.C1 = new.C1:lerp(ac1, 0.5)
  134. swait()
  135. end
  136. else
  137. new.C0 = new.C0:Lerp(ac0, 1)
  138. new.C1 = new.C1:lerp(ac1, 1)
  139. end
  140. end
  141. end)
  142. end
  143. end
  144. end
  145. function fixalljoints(fast)
  146. for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}) do
  147. removejoint(v, fast)
  148. end
  149. end
  150. function getnewjoints()
  151. local rs = replacejoint("Right Shoulder")
  152. local ls = replacejoint("Left Shoulder")
  153. local rh = replacejoint("Right Hip")
  154. local lh = replacejoint("Left Hip")
  155. local neck = replacejoint("Neck")
  156. local rj = replacejoint("RootJoint")
  157. return rs,ls,rh,lh,neck,rj
  158. end
  159. function knockback(hit, force)
  160. local bv = Instance.new("BodyVelocity")
  161. bv.MaxForce = huge
  162. bv.Velocity = force
  163. bv.Parent = hit
  164. game:GetService('Debris'):AddItem(bv, 0.15)
  165. end
  166. function soundeffect(id, volume, speed, parent, forcewait)
  167. local func = function()
  168. local s = LoadLibrary("RbxUtility").Create("Sound")()
  169. s.Name = "SoundEffect"
  170. s.Volume = volume
  171. s.PlaybackSpeed = speed
  172. s.SoundId = id
  173. s.Name = "dont"
  174. s.Looped = false
  175. s.Parent = parent
  176. s:Play()
  177. repeat wait() until not s.Playing
  178. s:Destroy()
  179. end
  180. if forcewait then
  181. func()
  182. else
  183. spawn(func)
  184. end
  185. end
  186. function getascendants(obj)
  187. local par = obj
  188. local ret = {}
  189. pcall(function()
  190. repeat
  191. par = par.Parent
  192. if par ~= nil then
  193. table.insert(ret, par)
  194. end
  195. until par == nil
  196. end)
  197. return ret
  198. end
  199. function findascendant(obj, class)
  200. local par = obj
  201. local ret = nil
  202. pcall(function()
  203. repeat
  204. par = par.Parent
  205. if par:IsA(class) then
  206. ret = par
  207. break
  208. end
  209. until par == nil
  210. end)
  211. return ret
  212. end
  213. function hurt(hit, dmg)
  214. --pcall(function()
  215. local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  216. if hum then
  217. if hum.Parent ~= char then
  218. hum.Health = hum.Health - dmg
  219. hum.Health = hum.Health - dmg
  220. soundeffect(soundlist.Headshot, 1.5, 1, workspace.CurrentCamera)
  221. return true
  222. end
  223. end
  224. --end)
  225. end
  226. --[[ Actual script :OOOOOOOOOO ]]--
  227. addattack(Enum.KeyCode.G, function()
  228. if not timeslow and not timefast and not reversing then
  229. local p = Instance.new("Part")
  230. p.Anchored = true
  231. p.Material = "Glass"
  232. p.Size = Vector3.new(0.1,0.1,0.1)
  233. p.BrickColor = BrickColor.new("Toothpaste")
  234. p.CanCollide = false
  235. p.CFrame = char.HumanoidRootPart.CFrame
  236. local m = Instance.new("SpecialMesh")
  237. m.MeshType = "Sphere"
  238. m.Parent = p
  239. p.Parent = char
  240. spawn(function()
  241. for i = 1, 50 do
  242. p.Transparency = i/50
  243. p.Size = p.Size:Lerp(Vector3.new(40,40,40),0.1)
  244. p.CFrame = char.HumanoidRootPart.CFrame
  245. swait()
  246. end
  247. p:Destroy()
  248. end)
  249. if not timestop then
  250. local s = Instance.new("Sound")
  251. s.Volume = 3
  252. s.Name = "dont"
  253. s.SoundId = soundlist.TimeStop
  254. s.Parent = char
  255. s:Play()
  256. dcon = workspace.DescendantAdded:connect(function(obj)
  257. pcall(function()
  258. swait()
  259. local ok = true
  260. for i,v in pairs(getascendants(obj)) do
  261. if v.Name:lower():find("ignoremodel") then
  262. ok = false
  263. end
  264. end
  265. if obj:IsA("BasePart") and ok and not findascendant(obj, "Tool") and not findascendant(obj, "HopperBin") and not findascendant(obj, "Camera") then
  266. if not obj.Anchored and obj.Name ~= "HumanoidRootPart" then
  267. table.insert(unfreeze, obj)
  268. obj.Anchored = true
  269. end
  270. end
  271. if obj:IsA("Sound") and obj.Name ~= "dont" then
  272. if obj.Playing then
  273. obj:Pause()
  274. table.insert(unfreeze, obj)
  275. end
  276. end
  277. if obj:IsA("Humanoid") then
  278. local last = obj.Health
  279. local always = last
  280. local con = obj.HealthChanged:connect(function(health)
  281. if last-health > 0 then
  282. table.insert(healthstuff, {hum = obj, change = last-health})
  283. end
  284. last = health
  285. obj.Health = always
  286. end)
  287. table.insert(connections, con)
  288. end
  289. end)
  290. end)
  291. for i,v in pairs(workspace:GetDescendants()) do
  292. pcall(function()
  293. if v:IsA("BasePart") then
  294. local ok = true
  295. for i,e in pairs(getascendants(v)) do
  296. if e.Name:lower():find("ignore_model") then
  297. ok = false
  298. end
  299. if e:IsA("Camera") then
  300. ok = false
  301. end
  302. end
  303. 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
  304. local ok = true
  305. if v.Parent:IsA("Accessory") then ok = false end
  306. if ok and v.Name ~= "HumanoidRootPart" then
  307. v.Anchored = true
  308. table.insert(unfreeze, v)
  309. end
  310. end
  311. end
  312. end)
  313. pcall(function()
  314. if v:IsA("Sound") and v.Name ~= "dont" then
  315. if v.Playing then
  316. v:Pause()
  317. table.insert(unfreeze, v)
  318. end
  319. end
  320. end)
  321. pcall(function()
  322. if v:IsA("Humanoid") then
  323. local last = v.Health
  324. local always = last
  325. local con = v.HealthChanged:connect(function(health)
  326. if last-health > 0 then
  327. table.insert(healthstuff, {hum = v, change = last-health})
  328. end
  329. last = health
  330. v.Health = always
  331. end)
  332. table.insert(connections, con)
  333. end
  334. end)
  335. end
  336. timestop = true
  337. game.Debris:AddItem(s, 2)
  338. else
  339. local s = Instance.new("Sound")
  340. s.Volume = 7
  341. s.Name = "dont"
  342. s.SoundId = soundlist.TimeResume
  343. s.Parent = char
  344. s:Play()
  345. end
  346. game.Debris:AddItem(s, 2)
  347. timestop = false
  348. for i,v in pairs(unfreeze) do
  349. pcall(function()
  350. v.Anchored = false
  351. end)
  352. pcall(function()
  353. v:Resume()
  354. end)
  355. end
  356. for i,v in pairs(connections) do
  357. pcall(function()
  358. v:disconnect()
  359. end)
  360. end
  361. for i,v in pairs(healthstuff) do
  362. pcall(function()
  363. local hum = v.hum
  364. hum.Health = hum.Health - v.change
  365. if hum.Parent:FindFirstChild("Health") then
  366. pcall(function()
  367. hum.Parent.Health.Disabled = false
  368. end)
  369. end
  370. end)
  371. end
  372. pcall(function()
  373. dcon:disconnect()
  374. end)
  375. healthstuff = {}
  376. unfreeze = {}
  377. end
  378. end
  379. end)
  380. local humanoiddata = {}
  381. local bodymoverdata = {}
  382. local dcon2
  383. local connectionsdata = {}
  384. addattack(Enum.KeyCode.H, function()
  385. if not timeslow and not timestop and not reversing then
  386. local p = Instance.new("Part")
  387. p.Anchored = true
  388. p.Material = "Glass"
  389. p.Size = Vector3.new(0.1,0.1,0.1)
  390. p.BrickColor = BrickColor.new("Toothpaste")
  391. p.CanCollide = false
  392. p.CFrame = char.HumanoidRootPart.CFrame
  393. local m = Instance.new("SpecialMesh")
  394. m.MeshType = "Sphere"
  395. m.Parent = p
  396. p.Parent = char
  397. spawn(function()
  398. for i = 1, 50 do
  399. p.Transparency = i/50
  400. p.Size = p.Size:Lerp(Vector3.new(40,40,40),0.1)
  401. p.CFrame = char.HumanoidRootPart.CFrame
  402. swait()
  403. end
  404. p:Destroy()
  405. end)
  406. if not timefast then
  407. timefast = true
  408. soundeffect(soundlist.TimeFast, 1.5, 1, char)
  409. for i,v in pairs(workspace:GetDescendants()) do
  410. if v:IsA("Humanoid") then
  411. table.insert(humanoiddata, {Hum = v, WS = v.WalkSpeed, JP = v.JumpPower})
  412. for _,track in pairs(v:GetPlayingAnimationTracks()) do
  413. end
  414. local con = v.AnimationPlayed:connect(function(track)
  415. end)
  416. table.insert(connections, con)
  417. end
  418. if v:IsA("BodyVelocity") then
  419. table.insert(bodymoverdata, {Mover = v, Vel = v.Velocity})
  420. end
  421. if v:IsA("BodyPosition") then
  422. table.insert(bodymoverdata, {Mover = v, Vel = v.P})
  423. end
  424. if v.Name == "HumanoidRootPart" and v:IsA("BasePart") then
  425. end
  426. if v:IsA("Sound") and v.Name ~= "dont" then
  427. table.insert(sounddata, {Sound = v, Speed = v.PlaybackSpeed})
  428. end
  429. end
  430. dcon2 = workspace.DescendantAdded:connect(function(v)
  431. swait(2)
  432. if v:IsA("Humanoid") then
  433. table.insert(humanoiddata, {Hum = v, WS = v.WalkSpeed, JP = v.JumpPower})
  434. for _,track in pairs(v:GetPlayingAnimationTracks()) do
  435. track:AdjustSpeed(1.4)
  436. end
  437. local con = v.AnimationPlayed:connect(function(track)
  438. track:AdjustSpeed(1.4)
  439. end)
  440. table.insert(connections, con)
  441. end
  442. if v:IsA("BodyVelocity") then
  443. table.insert(bodymoverdata, {Mover = v, Vel = v.Velocity})
  444. end
  445. if v:IsA("BodyPosition") then
  446. table.insert(bodymoverdata, {Mover = v, Vel = v.P})
  447. end
  448. if v.Name == "HumanoidRootPart" and v:IsA("BasePart") then
  449. end
  450. if v:IsA("Sound") and v.Name ~= "dont" then
  451. table.insert(sounddata, {Sound = v, Speed = v.PlaybackSpeed})
  452. end
  453. end)
  454. else
  455. timefast = false
  456. soundeffect(soundlist.TimeResume, 1.5, 1, char)
  457. for i,v in pairs(humanoiddata) do
  458. pcall(function()
  459. v["Hum"].WalkSpeed = v["WS"]
  460. v["Hum"].JumpPower = v["JP"]
  461. end)
  462. end
  463. for i,v in pairs(bodymoverdata) do
  464. pcall(function()
  465. if v["Mover"]:IsA("BodyVelocity") then
  466. v["Mover"].Velocity = v["Vel"]
  467. end
  468. if v["Mover"]:IsA("BodyPosition") then
  469. v["Mover"].P = v["Vel"]
  470. end
  471. end)
  472. end
  473. for i,v in pairs(sounddata) do
  474. pcall(function()
  475. v["Sound"].PlaybackSpeed = v["Speed"]
  476. end)
  477. end
  478. for i,v in pairs(connections) do
  479. pcall(function()
  480. v:disconnect()
  481. end)
  482. end
  483. connections = {}
  484. pcall(function()
  485. dcon2:disconnect()
  486. end)
  487. humanoiddata = {}
  488. end
  489. end
  490. end)
  491. local reversedata = {}
  492. local saved = false
  493. addattack(Enum.KeyCode.C, function()
  494. if not timestop and not timeslow and not timefast then
  495. if not saved then
  496. saved = true
  497. for i,v in pairs(workspace:GetDescendants()) do
  498. end
  499. else
  500. reversing = true
  501. saved = false
  502. soundeffect(soundlist.TimeReverse, 2, 1, workspace)
  503. for i = 1, 10 do
  504. for _,v in pairs(reversedata) do
  505. local obj = v.obj
  506. local cf = v.cf obj.Anchored = true
  507. end
  508. end
  509. swait()
  510. end
  511. char.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
  512. reversedata = {}
  513. reversing = false
  514. end
  515. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement