Advertisement
Idirina

Oof Speed

Jan 5th, 2018
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.91 KB | None | 0 0
  1. --services
  2. local debris = game:GetService("Debris")
  3. local chatservice = game:GetService("Chat")
  4.  
  5.  
  6.  
  7. --[[settings]]
  8.  
  9. --mode customization
  10. local opmultiplierws = 1.25
  11. local spdmultiplierws = 2
  12. local opmultiplierjp = 1
  13. local spdmultiplierjp = 1.25
  14.  
  15. --color
  16. local maincolor = BrickColor.new("Bright yellow")
  17. local secondarycolor = BrickColor.new("Bright blue")
  18. local flamecolor = BrickColor.new("Really red")
  19.  
  20. --music
  21. local musicid = "rbxassetid://571839980"
  22. local runmusicid = "rbxassetid://703893300"
  23.  
  24. --flash effect
  25. local flashduration = 0
  26.  
  27.  
  28. --jump power
  29. local walkjp = 50
  30. local runjp = 70
  31.  
  32.  
  33. --walk speed
  34. local walkspd = 26
  35. local runspd = 100
  36.  
  37.  
  38. local spd = 16
  39. local jpower = 50
  40.  
  41.  
  42. --enables
  43. local running = false
  44. local autotarget = false
  45. local opmode = false
  46. local chatting = false
  47. local superspeed = false
  48.  
  49.  
  50. --script
  51. local player = game:GetService("Players").LocalPlayer
  52. local mouse = player:GetMouse()
  53. repeat
  54. wait()
  55. until player.Character
  56. local character = player.Character
  57. local humanoid = character:FindFirstChild("Humanoid")
  58. local torso = character:FindFirstChild("Torso")
  59. if not torso and not humanoid then
  60. print("Torso and humanoid not found")
  61. return
  62. elseif not torso then
  63. print("No torso found")
  64. return
  65. elseif not humanoid then
  66. print("No humanoid found")
  67. return
  68. end
  69.  
  70.  
  71.  
  72. --useful functions
  73.  
  74. local function randomize(value1, value2)
  75. math.randomseed(os.time())
  76. for i=1,10 do
  77. math.random(1,100)
  78. end
  79. local randomizeeebebebe = math.random(value1, value2)
  80. return randomizeeebebebe
  81. end
  82.  
  83.  
  84.  
  85. --attacking
  86. local function attak(thing, thinghumanoid, place)
  87.  
  88. local hiteffect = Instance.new("Part", thing)
  89. hiteffect.Name = "Hit Effect"
  90. if opmode then
  91. hiteffect.BrickColor = secondarycolor
  92. else
  93. hiteffect.BrickColor = maincolor
  94. end
  95. hiteffect.Material = Enum.Material.Neon
  96. hiteffect.Anchored = true
  97. hiteffect.CanCollide = false
  98. hiteffect.CFrame = CFrame.new(thing.Position)
  99. hiteffect.Size = Vector3.new()
  100. hiteffect.Transparency = 0
  101. hiteffect.Shape = "Ball"
  102.  
  103. thing.CFrame = thing.CFrame + Vector3.new(0,0.1,0)
  104. if superspeed then
  105. thing.Velocity = thing.Velocity + ((thing.Position - place.Position).unit * 500)
  106. end
  107. if opmode then
  108. thinghumanoid.Parent:BreakJoints()
  109. thing.Velocity = thing.Velocity + ((thing.Position - place.Position).unit * 1000)
  110. hiteffect.Size = Vector3.new(25,25,25)
  111. debris:AddItem(thinghumanoid.Parent, 1)
  112. else
  113. thinghumanoid:TakeDamage(randomize(17,24))
  114. end
  115.  
  116. thing.Velocity = thing.Velocity + ((thing.Position - place.Position).unit * 100)
  117.  
  118. coroutine.resume(coroutine.create(function()
  119. local hitchange = Vector3.new(0,hiteffect.Transparency,0)
  120. for i=1,10 do
  121. hiteffect.Transparency = hitchange.Y
  122. hiteffect.Size = hiteffect.Size:lerp(Vector3.new(7,7,7), 0.05 * i)
  123. hitchange = hitchange:lerp(Vector3.new(0,1,0), 0.05 * i)
  124. if superspeed then
  125. hiteffect.Color = hiteffect.Color:lerp(flamecolor.Color, 0.1 * i)
  126. end
  127. wait()
  128. end
  129. hiteffect:Destroy()
  130. end))
  131. end
  132.  
  133. local function Attack(area, range, autorange)
  134. local searchrange = range
  135. local autosearch = autorange
  136. local htorso = nil
  137. local hhumanoid = nil
  138. local autotargethumanoid = nil
  139. local autotargettorso = nil
  140. for i,v in pairs(game.Workspace:GetChildren()) do
  141. local ttorso = v:FindFirstChild("Torso")
  142. if not ttorso then
  143. ttorso = v:FindFirstChild("UpperTorso")
  144. if not ttorso then
  145. ttorso = v:FindFirstChild("HumanoidRootPart")
  146. end
  147. end
  148. local thumanoid = v:FindFirstChild("Humanoid")
  149. if ttorso and thumanoid and v ~= character then
  150. if thumanoid.Health > 0 then
  151. local distaway = (area.Position - ttorso.Position).magnitude
  152.  
  153. if distaway < range then
  154. attak(ttorso, thumanoid, area)
  155. end
  156.  
  157. if distaway < range then
  158. htorso = ttorso
  159. hhumanoid = thumanoid
  160. searchrange = distaway
  161. end
  162. if distaway < autosearch then
  163. autotargettorso = ttorso
  164. autotargethumanoid = thumanoid
  165. autosearch = distaway
  166. end
  167. end
  168. end
  169. end
  170. if htorso and hhumanoid then
  171. if autotarget and autotargettorso and autotargethumanoid then
  172. if autotargethumanoid.Health > 0 then
  173. humanoid:MoveTo(autotargettorso.Position)
  174. torso.Velocity = torso.Velocity + (torso.CFrame.lookVector * 50)
  175. end
  176. end
  177. end
  178. end
  179.  
  180.  
  181.  
  182. --music
  183. local music = Instance.new("Sound", torso)
  184. music.SoundId = musicid
  185. music.Volume = 0 --default 0.5
  186. music.EmitterSize = 10 --default 10
  187. music.PlaybackSpeed = 1 --default 1
  188. music.Looped = true
  189.  
  190.  
  191.  
  192.  
  193. --text
  194. local bgui = Instance.new("BillboardGui",character)
  195. bgui.Size = UDim2.new(0,100,0,40)
  196. bgui.StudsOffset = Vector3.new(0,2,0)
  197. bgui.Adornee = character.Head
  198. local texty = Instance.new("TextLabel", bgui)
  199. texty.BackgroundTransparency = 1
  200. texty.BorderSizePixel = 0
  201. texty.Text = ""
  202. texty.Font = "Cartoon"
  203. texty.FontSize = "Size24"
  204. texty.TextStrokeTransparency = 0.7
  205. texty.TextStrokeColor3 = Color3.new(1,1,0)
  206. texty.TextColor3 = Color3.new(1,1,0)
  207. texty.Size = UDim2.new(1,0,0.5,0)
  208.  
  209. coroutine.resume(coroutine.create(function()
  210. while true do
  211. wait()
  212. texty.Position = UDim2.new((math.cos(tick() * 15) / 5), 0, math.sin(tick() * 15) / 5, 0)
  213. if not chatting then
  214. texty.Text = "-" ..player.Name.. "-"
  215. end
  216. end
  217. end))
  218.  
  219.  
  220. player.Chatted:connect(function(chat)
  221. chatting = true
  222. chat = chatservice:FilterStringForBroadcast(chat, player)
  223. for i=1,string.len(chat) do
  224. texty.Text = string.sub(chat, 1, i)
  225. wait()
  226. end
  227. wait(2)
  228. chatting = false
  229. end)
  230.  
  231.  
  232.  
  233. --INTRO
  234. music:Play()
  235. humanoid.WalkSpeed = 0
  236.  
  237. wait(1)
  238.  
  239. local effect = Instance.new("Part", character)
  240. effect.Name = "Effect"
  241. effect.BrickColor = maincolor
  242. effect.Material = Enum.Material.Neon
  243. effect.Anchored = true
  244. effect.CanCollide = false
  245. effect.CFrame = CFrame.new(torso.Position)
  246. effect.Size = Vector3.new(10,10,10)
  247. effect.Shape = "Ball"
  248.  
  249. for i=1,1 do
  250. local change = Vector3.new(0,1,0)
  251. for i=1,20 do
  252. effect.Size = effect.Size:lerp(Vector3.new(0,0,0), 0.03 * i)
  253. effect.Transparency = change.Y
  254. change = change:lerp(Vector3.new(0,0,0), 0.02 * i)
  255. music.Volume = change.Y / 1
  256. wait()
  257. end
  258.  
  259. change = Vector3.new(0,1,0)
  260. effect.Size = Vector3.new(10,10,10)
  261. for i=1,20 do
  262. effect.Size = effect.Size:lerp(Vector3.new(0,0,0), 0.03 * i)
  263. effect.Transparency = change.Y
  264. change = change:lerp(Vector3.new(0,0,0), 0.02 * i)
  265. music.Volume = change.Y / 1
  266. wait()
  267. end
  268.  
  269. change = Vector3.new(0,1,0)
  270. effect.Size = Vector3.new(10,10,10)
  271. for i=1,20 do
  272. effect.Size = effect.Size:lerp(Vector3.new(0,0,0), 0.03 * i)
  273. effect.Transparency = change.Y
  274. change = change:lerp(Vector3.new(0,0,0), 0.02 * i)
  275. music.Volume = change.Y / 1
  276. wait()
  277. end
  278.  
  279. change = Vector3.new(0,0,0)
  280. effect.Size = Vector3.new(0,0,0)
  281. for i=1,20 do
  282. effect.Size = effect.Size:lerp(Vector3.new(30,30,30), 0.03 * i)
  283. effect.Color = effect.Color:lerp(flamecolor.Color, 0.03 * i)
  284. effect.Transparency = change.Y
  285. change = change:lerp(Vector3.new(0,1,0), 0.02 * i)
  286. music.Volume = change.Y / 1
  287. wait()
  288. end
  289. music.Volume = 1
  290. effect:Destroy()
  291. end
  292.  
  293.  
  294.  
  295. --set humanoid stats
  296. coroutine.resume(coroutine.create(function()
  297. while true do
  298. wait()
  299. humanoid.PlatformStand = false
  300. humanoid.WalkSpeed = spd
  301. humanoid.JumpPower = jpower
  302. humanoid.MaxHealth = math.huge
  303. humanoid.Health = math.huge
  304. for i,v in pairs(character:GetChildren()) do
  305. if v:IsA("Part") then
  306. v.Anchored = false
  307. end
  308. end
  309. end
  310. end))
  311.  
  312.  
  313. --visual effect for running
  314. local function Effect()
  315. for i,v in pairs(character:GetChildren()) do
  316. if v:IsA("Part") then
  317. local shadow = v:Clone()
  318. shadow:ClearAllChildren()
  319. if v.Name == "Head" then
  320. shadow.Size = Vector3.new(1.25,1.25,1.25)
  321. end
  322. --[[if opmode then
  323. shadow.BrickColor = secondarycolor
  324. else
  325. shadow.BrickColor = maincolor
  326. end]]
  327. shadow.CanCollide = false
  328. shadow.Anchored = true
  329. shadow.Material = Enum.Material.Neon
  330. shadow.Transparency = 0.5
  331. shadow.Parent = workspace
  332.  
  333. coroutine.resume(coroutine.create(function()
  334. wait(flashduration)
  335. local flash = Vector3.new(0,shadow.Transparency,0)
  336. local originalsize = shadow.Size
  337. for i=1,10 do
  338. wait()
  339. shadow.Transparency = flash.Y
  340. shadow.Size = shadow.Size:lerp(Vector3.new(), 0.05 * i)
  341. shadow.Size = shadow.Size:lerp(originalsize + (Vector3.new(1,1,1) * (music.PlaybackLoudness / 50)), 0.05)
  342. flash = flash:lerp(Vector3.new(0,1,0), 0.05 * i)
  343. if superspeed then
  344. shadow.Color = shadow.Color:lerp(flamecolor.Color, 0.2 * i)
  345. end
  346. if opmode then
  347. shadow.CFrame = shadow.CFrame:lerp(v.CFrame, 0.05 * i)
  348. end
  349. end
  350. shadow:Destroy()
  351. end))
  352. end
  353. end
  354. end
  355.  
  356.  
  357.  
  358. --keys
  359. mouse.KeyDown:connect(function(key)
  360. local bytekey = key:byte()
  361. local skey = key:lower()
  362. if bytekey == 48 then --Shift
  363. running = true
  364. torso.Velocity = torso.Velocity + (torso.CFrame.lookVector * 100)
  365. end
  366. if skey == "z" then
  367. if autotarget then
  368. autotarget = false
  369. else
  370. autotarget = true
  371. end
  372. end
  373. if skey == "x" then
  374. if opmode then
  375. opmode = false
  376. runspd = runspd / opmultiplierws
  377. runjp = runjp / opmultiplierjp
  378. else
  379. opmode = true
  380. runspd = runspd * opmultiplierws
  381. runjp = runjp * opmultiplierjp
  382. end
  383. end
  384. if skey == "c" then
  385. if superspeed then
  386. superspeed = false
  387. runspd = runspd / spdmultiplierws
  388. runjp = runjp / spdmultiplierjp
  389. else
  390. superspeed = true
  391. runspd = runspd * spdmultiplierws
  392. runjp = runjp * spdmultiplierjp
  393. end
  394. end
  395. end)
  396.  
  397. mouse.KeyUp:connect(function(key)
  398. local bytekey = key:byte()
  399. local skey = key:lower()
  400. if bytekey == 48 then --Shift
  401. running = false
  402. end
  403. end)
  404.  
  405.  
  406.  
  407. --main
  408. while true do
  409. if not running then
  410. spd = walkspd
  411. jpower = walkjp
  412. music.SoundId = musicid
  413. else
  414. spd = runspd
  415. jpower = runjp
  416. music.SoundId = runmusicid
  417. if torso.Velocity.magnitude > 1 then
  418. Effect()
  419. Attack(torso, 10, 150)
  420. end
  421. end
  422. wait()
  423. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement