Advertisement
Mediakiller7Cool

Sonic

Mar 20th, 2019
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.01 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("FE Compatibility code V2 by Mokiros")
  6. local RealPlayer = RealPlayer
  7. script.Parent = RealPlayer.Character
  8.  
  9. --Fake event to make stuff like Mouse.KeyDown work
  10. local Disconnect_Function = function(this)
  11. this[1].Functions[this[2]] = nil
  12. end
  13. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  14. local FakeEvent_Metatable = {__index={
  15. Connect = function(this,f)
  16. local i = tostring(math.random(0,10000))
  17. while this.Functions[i] do
  18. i = tostring(math.random(0,10000))
  19. end
  20. this.Functions[i] = f
  21. return setmetatable({this,i},Disconnect_Metatable)
  22. end
  23. }}
  24. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  25. local function fakeEvent()
  26. return setmetatable({Functions={}},FakeEvent_Metatable)
  27. end
  28.  
  29. --Creating fake input objects with fake variables
  30. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  31. FakeMouse.keyUp = FakeMouse.KeyUp
  32. FakeMouse.keyDown = FakeMouse.KeyDown
  33. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  34. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  35. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  36. end}
  37. --Merged 2 functions into one by checking amount of arguments
  38. CAS.UnbindAction = CAS.BindAction
  39.  
  40. --This function will trigger the events that have been :Connect()'ed
  41. local function TriggerEvent(self,ev,...)
  42. for _,f in pairs(self[ev].Functions) do
  43. f(...)
  44. end
  45. end
  46. FakeMouse.TriggerEvent = TriggerEvent
  47. UIS.TriggerEvent = TriggerEvent
  48.  
  49. --Client communication
  50. local Event = Instance.new("RemoteEvent")
  51. Event.Name = "UserInput_Event"
  52. Event.OnServerEvent:Connect(function(plr,io)
  53. if plr~=RealPlayer then return end
  54. FakeMouse.Target = io.Target
  55. FakeMouse.Hit = io.Hit
  56. if not io.isMouse then
  57. local b = io.UserInputState == Enum.UserInputState.Begin
  58. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  59. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  60. end
  61. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  62. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  63. end
  64. for _,t in pairs(CAS.Actions) do
  65. for _,k in pairs(t.Keys) do
  66. if k==io.KeyCode then
  67. t.Function(t.Name,io.UserInputState,io)
  68. end
  69. end
  70. end
  71. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  72. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  73. end
  74. end)
  75. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  76. local Mouse = owner:GetMouse()
  77. local UIS = game:GetService("UserInputService")
  78. local input = function(io,RobloxHandled)
  79. if RobloxHandled then return end
  80. --Since InputObject is a client-side instance, we create and pass table instead
  81. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  82. end
  83. UIS.InputBegan:Connect(input)
  84. UIS.InputEnded:Connect(input)
  85. local h,t
  86. --Give the server mouse data every second frame, but only if the values changed
  87. --If player is not moving their mouse, client won't fire events
  88. local HB = game:GetService("RunService").Heartbeat
  89. while true do
  90. if h~=Mouse.Hit or t~=Mouse.Target then
  91. h,t=Mouse.Hit,Mouse.Target
  92. Event:FireServer({isMouse=true,Target=t,Hit=h})
  93. end
  94. --Wait 2 frames
  95. for i=1,2 do
  96. HB:Wait()
  97. end
  98. end]==],script)
  99.  
  100. ----Sandboxed game object that allows the usage of client-side methods and services
  101. --Real game object
  102. local RealGame = game
  103.  
  104. --Metatable for fake service
  105. local FakeService_Metatable = {
  106. __index = function(self,k)
  107. local s = rawget(self,"_RealService")
  108. if s then
  109. return typeof(s[k])=="function"
  110. and function(_,...)return s[k](s,...)end or s[k]
  111. end
  112. end,
  113. __newindex = function(self,k,v)
  114. local s = rawget(self,"_RealService")
  115. if s then s[k]=v end
  116. end
  117. }
  118. local function FakeService(t,RealService)
  119. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  120. return setmetatable(t,FakeService_Metatable)
  121. end
  122.  
  123. --Fake game object
  124. local FakeGame = {
  125. GetService = function(self,s)
  126. return rawget(self,s) or RealGame:GetService(s)
  127. end,
  128. Players = FakeService({
  129. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  130. },"Players"),
  131. UserInputService = FakeService(UIS,"UserInputService"),
  132. ContextActionService = FakeService(CAS,"ContextActionService"),
  133. RunService = FakeService({
  134. _btrs = {},
  135. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  136. BindToRenderStep = function(self,name,_,fun)
  137. self._btrs[name] = self.Heartbeat:Connect(fun)
  138. end,
  139. UnbindFromRenderStep = function(self,name)
  140. self._btrs[name]:Disconnect()
  141. end,
  142. },"RunService")
  143. }
  144. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  145. FakeGame.service = FakeGame.GetService
  146. FakeService(FakeGame,game)
  147. --Changing owner to fake player object to support owner:GetMouse()
  148. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  149. end
  150. -- [ SANIIIC HES ON DA RAWN ] --
  151. wait()
  152. thing = 0
  153. LoudVolume = false
  154. Submerged = false
  155. Music = true
  156. script.Name = "SANIIIIC"
  157. Player = game.Players.LocalPlayer
  158. c = game.Players.LocalPlayer.Character
  159. Head = c.Head
  160. Humanoid = c.Humanoid
  161. anim = c.Humanoid.Animator
  162. rage = false
  163. p = game.Players.LocalPlayer
  164. Music = false
  165. anim = Humanoid.Animator
  166. local Effects = {}
  167. attack = false
  168. local attacking = false
  169. vt = Vector3.new
  170. bc = BrickColor.new
  171. br = BrickColor.random
  172. it = Instance.new
  173. cf = CFrame.new
  174. euler = CFrame.fromEulerAnglesXYZ
  175. angles = CFrame.Angles
  176. matr = math.random
  177. mouse = Player:GetMouse()
  178.  
  179. RSC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  180. RSC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  181. LSC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  182. LSC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  183. RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  184. RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  185. LHC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  186. LHC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  187. NC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  188. NC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  189. RJC0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  190. RJC1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  191. RS = c.Torso:FindFirstChild("Right Shoulder")
  192. LS = c.Torso:FindFirstChild("Left Shoulder")
  193. RH = c.Torso:FindFirstChild("Right Hip")
  194. LH = c.Torso:FindFirstChild("Left Hip")
  195. RJ = c.HumanoidRootPart:FindFirstChild("RootJoint")
  196. N = c.Torso:FindFirstChild("Neck")
  197. cf = CFrame.new
  198. ang = CFrame.Angles
  199. rd = math.rad
  200. rd2 = math.random
  201.  
  202. --[[mainShirt = c.Shirt
  203. mainPants = c.Pants
  204. mainBColors = c["Body Colors"]
  205. mainShirt.ShirtTemplate = "rbxassetid://769869277"
  206. mainPants.PantsTemplate = "rbxassetid://805486769"
  207. mainBColors.HeadColor = BrickColor.new("Pastel brown")
  208. mainBColors.LeftArmColor = BrickColor.new("Pastel brown")
  209. mainBColors.LeftLegColor = BrickColor.new("Pastel brown")
  210. mainBColors.RightArmColor = BrickColor.new("Pastel brown")
  211. mainBColors.RightLegColor = BrickColor.new("Pastel brown")
  212. mainBColors.TorsoColor = BrickColor.new("Pastel brown")]]
  213. function swait(num)
  214. if num==0 or num==nil then
  215. game:service'RunService'.Heartbeat:wait(0)
  216. else
  217. for i=0,num do
  218. game:service'RunService'.Heartbeat:wait(0)
  219. end
  220. end
  221. end
  222.  
  223. function lerpz(joint, prop, cfrmz, alp)
  224. joint[prop] = joint[prop]:lerp(cfrmz, alp)
  225. end
  226. function resetlerp()
  227. RJ.C0 = RJC0
  228. RJ.C1 = RJC1
  229. N.C0 = NC0
  230. N.C1 = NC1
  231. RS.C0 = RSC0
  232. RS.C1 = RSC1
  233. LS.C0 = LSC0
  234. LS.C1 = LSC1
  235. RH.C0 = RHC0
  236. RH.C1 = RHC1
  237. LH.C0 = LHC0
  238. LH.C1 = LHC1
  239. end
  240.  
  241. local S2 = Instance.new("Sound",c.HumanoidRootPart)S2.SoundId = "rbxassetid://1246460167" S2.Volume = 0 S2.PlaybackSpeed = 0 S2.Looped = true S2:Play()
  242. c.Head.face:remove()
  243.  
  244. local ColorArray = {ColorSequenceKeypoint.new(0, Color3.new(0/255,170/255,255/255)),ColorSequenceKeypoint.new(1, Color3.new(0/255,170/255,255/255))}
  245. local att1 = Instance.new("Attachment", c["Right Leg"])
  246. att1.Name = "att1"
  247. att1.Position = Vector3.new(0.5, 1, 0.5)
  248. local att2 = Instance.new("Attachment", c["Right Leg"])
  249. att2.Name = "att2"
  250. att2.Position = Vector3.new(-0.5, 1, 0.5)
  251. local att3 = Instance.new("Attachment", c["Right Leg"])
  252. att3.Name = "att3"
  253. att3.Position = Vector3.new(0.5, -1, 0.5)
  254. local att4 = Instance.new("Attachment", c["Right Leg"])
  255. att4.Name = "att4"
  256. att4.Position = Vector3.new(-0.5, -1, 0.5)
  257.  
  258. local attt1 = Instance.new("Attachment", c["Left Leg"])
  259. attt1.Name = "att1"
  260. attt1.Position = Vector3.new(0.5, 1, 0.5)
  261. local attt2 = Instance.new("Attachment", c["Left Leg"])
  262. attt2.Name = "att2"
  263. attt2.Position = Vector3.new(-0.5, 1, 0.5)
  264. local attt3 = Instance.new("Attachment", c["Left Leg"])
  265. attt3.Name = "att3"
  266. attt3.Position = Vector3.new(0.5, -1, 0.5)
  267. local attt4 = Instance.new("Attachment", c["Left Leg"])
  268. attt4.Name = "att4"
  269. attt4.Position = Vector3.new(-0.5, -1, 0.5)
  270.  
  271. local trailtop1 = Instance.new("Trail", c["Right Leg"])
  272. trailtop1.Enabled = true
  273. trailtop1.Texture = "rbxassetid://16607923"
  274. trailtop1.Name = "toptrail"
  275. trailtop1.MinLength = 0
  276. trailtop1.Lifetime = 0.1
  277.  
  278. trailtop1.Color = ColorSequence.new(ColorArray)
  279.  
  280. trailtop1.Attachment0 = att1
  281. trailtop1.Attachment1 = att2
  282. trailtop1.Transparency = NumberSequence.new({
  283. NumberSequenceKeypoint.new(0, 0.5, 0),
  284. NumberSequenceKeypoint.new(1, 1, 0)
  285. })
  286.  
  287. local trailbot1 = Instance.new("Trail", c["Right Leg"])
  288. trailbot1.Enabled = true
  289. trailbot1.Texture = "rbxassetid://16607923"
  290. trailbot1.Name = "bottrail"
  291. trailbot1.MinLength = 0
  292. trailbot1.Lifetime = 0.1
  293.  
  294. trailbot1.Color = ColorSequence.new(ColorArray)
  295.  
  296. trailbot1.Attachment0 = att3
  297. trailbot1.Attachment1 = att4
  298. trailbot1.Transparency = NumberSequence.new({
  299. NumberSequenceKeypoint.new(0, 0.5, 0),
  300. NumberSequenceKeypoint.new(1, 1, 0)
  301. })
  302.  
  303. local trailside1 = Instance.new("Trail", c["Right Leg"])
  304. trailside1.Enabled = true
  305. trailside1.Texture = "rbxassetid://16607923"
  306. trailside1.Name = "sidetrail1"
  307. trailside1.MinLength = 0
  308. trailside1.Lifetime = 0.1
  309.  
  310. trailside1.Color = ColorSequence.new(ColorArray)
  311.  
  312. trailside1.Attachment0 = att1
  313. trailside1.Attachment1 = att3
  314. trailside1.Transparency = NumberSequence.new({
  315. NumberSequenceKeypoint.new(0, 0.5, 0),
  316. NumberSequenceKeypoint.new(1, 1, 0)
  317. })
  318.  
  319. local trailside2 = Instance.new("Trail", c["Right Leg"])
  320. trailside2.Enabled = true
  321. trailside2.Texture = "rbxassetid://16607923"
  322. trailside2.Name = "sidetrail2"
  323. trailside2.MinLength = 0
  324. trailside2.Lifetime = 0.1
  325. spawn(function()
  326. while true do wait()
  327. trailside2.Color = ColorSequence.new(ColorArray)
  328. end
  329. end)
  330. trailside2.Attachment0 = att2
  331. trailside2.Attachment1 = att4
  332. trailside2.Transparency = NumberSequence.new({
  333. NumberSequenceKeypoint.new(0, 0.5, 0),
  334. NumberSequenceKeypoint.new(1, 1, 0)
  335. })
  336.  
  337.  
  338. local trailtop12 = Instance.new("Trail", c["Left Leg"])
  339. trailtop12.Enabled = true
  340. trailtop12.Texture = "rbxassetid://16607923"
  341. trailtop12.Name = "toptrail"
  342. trailtop12.MinLength = 0
  343. trailtop12.Lifetime = 0.1
  344. spawn(function()
  345. while true do wait()
  346. trailtop12.Color = ColorSequence.new(ColorArray)
  347. end
  348. end)
  349. trailtop12.Attachment0 = attt1
  350. trailtop12.Attachment1 = attt2
  351. trailtop12.Transparency = NumberSequence.new({
  352. NumberSequenceKeypoint.new(0, 0.5, 0),
  353. NumberSequenceKeypoint.new(1, 1, 0)
  354. })
  355.  
  356. local trailbot2 = Instance.new("Trail", c["Left Leg"])
  357. trailbot2.Enabled = true
  358. trailbot2.Texture = "rbxassetid://16607923"
  359. trailbot2.Name = "bottrail"
  360. trailbot2.MinLength = 0
  361. trailbot2.Lifetime = 0.1
  362.  
  363. trailbot2.Color = ColorSequence.new(ColorArray)
  364.  
  365. trailbot2.Attachment0 = attt3
  366. trailbot2.Attachment1 = attt4
  367. trailbot2.Transparency = NumberSequence.new({
  368. NumberSequenceKeypoint.new(0, 0.5, 0),
  369. NumberSequenceKeypoint.new(1, 1, 0)
  370. })
  371.  
  372. local trailside12 = Instance.new("Trail", c["Left Leg"])
  373. trailside12.Enabled = true
  374. trailside12.Texture = "rbxassetid://16607923"
  375. trailside12.Name = "sidetrail1"
  376. trailside12.MinLength = 0
  377. trailside12.Lifetime = 0.1
  378.  
  379. trailside12.Color = ColorSequence.new(ColorArray)
  380.  
  381. trailside12.Attachment0 = attt1
  382. trailside12.Attachment1 = attt3
  383. trailside12.Transparency = NumberSequence.new({
  384. NumberSequenceKeypoint.new(0, 0.5, 0),
  385. NumberSequenceKeypoint.new(1, 1, 0)
  386. })
  387.  
  388. local trailside22 = Instance.new("Trail", c["Left Leg"])
  389. trailside22.Enabled = true
  390. trailside22.Texture = "rbxassetid://16607923"
  391. trailside22.Name = "sidetrail2"
  392. trailside22.MinLength = 0
  393. trailside22.Lifetime = 0.1
  394.  
  395. trailside22.Color = ColorSequence.new(ColorArray)
  396.  
  397. trailside22.Attachment0 = attt2
  398. trailside22.Attachment1 = attt4
  399. trailside22.Transparency = NumberSequence.new({
  400. NumberSequenceKeypoint.new(0, 0.5, 0),
  401. NumberSequenceKeypoint.new(1, 1, 0)
  402. })
  403.  
  404.  
  405. local att1 = Instance.new("Attachment", c["Right Arm"])
  406. att1.Name = "att1"
  407. att1.Position = Vector3.new(0.5, 1, 0.5)
  408. local att2 = Instance.new("Attachment", c["Right Arm"])
  409. att2.Name = "att2"
  410. att2.Position = Vector3.new(-0.5, 1, 0.5)
  411. local att3 = Instance.new("Attachment", c["Right Arm"])
  412. att3.Name = "att3"
  413. att3.Position = Vector3.new(0.5, -1, 0.5)
  414. local att4 = Instance.new("Attachment", c["Right Arm"])
  415. att4.Name = "att4"
  416. att4.Position = Vector3.new(-0.5, -1, 0.5)
  417.  
  418. local attt1 = Instance.new("Attachment", c["Left Arm"])
  419. attt1.Name = "att1"
  420. attt1.Position = Vector3.new(0.5, 1, 0.5)
  421. local attt2 = Instance.new("Attachment", c["Left Arm"])
  422. attt2.Name = "att2"
  423. attt2.Position = Vector3.new(-0.5, 1, 0.5)
  424. local attt3 = Instance.new("Attachment", c["Left Arm"])
  425. attt3.Name = "att3"
  426. attt3.Position = Vector3.new(0.5, -1, 0.5)
  427. local attt4 = Instance.new("Attachment", c["Left Arm"])
  428. attt4.Name = "att4"
  429. attt4.Position = Vector3.new(-0.5, -1, 0.5)
  430.  
  431. local trailtop1 = Instance.new("Trail", c["Right Arm"])
  432. trailtop1.Enabled = true
  433. trailtop1.Texture = "rbxassetid://16607923"
  434. trailtop1.Name = "toptrail"
  435. trailtop1.MinLength = 0
  436. trailtop1.Lifetime = 0.1
  437.  
  438. trailtop1.Color = ColorSequence.new(ColorArray)
  439.  
  440. trailtop1.Attachment0 = att1
  441. trailtop1.Attachment1 = att2
  442. trailtop1.Transparency = NumberSequence.new({
  443. NumberSequenceKeypoint.new(0, 0.5, 0),
  444. NumberSequenceKeypoint.new(1, 1, 0)
  445. })
  446.  
  447. local trailbot1 = Instance.new("Trail", c["Right Arm"])
  448. trailbot1.Enabled = true
  449. trailbot1.Texture = "rbxassetid://16607923"
  450. trailbot1.Name = "bottrail"
  451. trailbot1.MinLength = 0
  452. trailbot1.Lifetime = 0.1
  453. spawn(function()
  454. while true do wait()
  455. trailbot1.Color = ColorSequence.new(ColorArray)
  456. end
  457. end)
  458. trailbot1.Attachment0 = att3
  459. trailbot1.Attachment1 = att4
  460. trailbot1.Transparency = NumberSequence.new({
  461. NumberSequenceKeypoint.new(0, 0.5, 0),
  462. NumberSequenceKeypoint.new(1, 1, 0)
  463. })
  464.  
  465. local trailside1 = Instance.new("Trail", c["Right Arm"])
  466. trailside1.Enabled = true
  467. trailside1.Texture = "rbxassetid://16607923"
  468. trailside1.Name = "sidetrail1"
  469. trailside1.MinLength = 0
  470. trailside1.Lifetime = 0.1
  471.  
  472. trailside1.Color = ColorSequence.new(ColorArray)
  473.  
  474. trailside1.Attachment0 = att1
  475. trailside1.Attachment1 = att3
  476. trailside1.Transparency = NumberSequence.new({
  477. NumberSequenceKeypoint.new(0, 0.5, 0),
  478. NumberSequenceKeypoint.new(1, 1, 0)
  479. })
  480.  
  481. local trailside2 = Instance.new("Trail", c["Right Arm"])
  482. trailside2.Enabled = true
  483. trailside2.Texture = "rbxassetid://16607923"
  484. trailside2.Name = "sidetrail2"
  485. trailside2.MinLength = 0
  486. trailside2.Lifetime = 0.1
  487.  
  488. trailside2.Color = ColorSequence.new(ColorArray)
  489.  
  490. trailside2.Attachment0 = att2
  491. trailside2.Attachment1 = att4
  492. trailside2.Transparency = NumberSequence.new({
  493. NumberSequenceKeypoint.new(0, 0.5, 0),
  494. NumberSequenceKeypoint.new(1, 1, 0)
  495. })
  496.  
  497.  
  498. local trailtop12 = Instance.new("Trail", c["Left Arm"])
  499. trailtop12.Enabled = true
  500. trailtop12.Texture = "rbxassetid://16607923"
  501. trailtop12.Name = "toptrail"
  502. trailtop12.MinLength = 0
  503. trailtop12.Lifetime = 0.1
  504.  
  505. trailtop12.Color = ColorSequence.new(ColorArray)
  506.  
  507. trailtop12.Attachment0 = attt1
  508. trailtop12.Attachment1 = attt2
  509. trailtop12.Transparency = NumberSequence.new({
  510. NumberSequenceKeypoint.new(0, 0.5, 0),
  511. NumberSequenceKeypoint.new(1, 1, 0)
  512. })
  513.  
  514. local trailbot2 = Instance.new("Trail", c["Left Arm"])
  515. trailbot2.Enabled = true
  516. trailbot2.Texture = "rbxassetid://16607923"
  517. trailbot2.Name = "bottrail"
  518. trailbot2.MinLength = 0
  519. trailbot2.Lifetime = 0.1
  520.  
  521. trailbot2.Color = ColorSequence.new(ColorArray)
  522.  
  523. trailbot2.Attachment0 = attt3
  524. trailbot2.Attachment1 = attt4
  525. trailbot2.Transparency = NumberSequence.new({
  526. NumberSequenceKeypoint.new(0, 0.5, 0),
  527. NumberSequenceKeypoint.new(1, 1, 0)
  528. })
  529.  
  530. local trailside12 = Instance.new("Trail", c["Left Arm"])
  531. trailside12.Enabled = true
  532. trailside12.Texture = "rbxassetid://16607923"
  533. trailside12.Name = "sidetrail1"
  534. trailside12.MinLength = 0
  535. trailside12.Lifetime = 0.1
  536.  
  537. trailside12.Color = ColorSequence.new(ColorArray)
  538.  
  539. trailside12.Attachment0 = attt1
  540. trailside12.Attachment1 = attt3
  541. trailside12.Transparency = NumberSequence.new({
  542. NumberSequenceKeypoint.new(0, 0.5, 0),
  543. NumberSequenceKeypoint.new(1, 1, 0)
  544. })
  545.  
  546. local trailside22 = Instance.new("Trail", c["Left Arm"])
  547. trailside22.Enabled = true
  548. trailside22.Texture = "rbxassetid://16607923"
  549. trailside22.Name = "sidetrail2"
  550. trailside22.MinLength = 0
  551. trailside22.Lifetime = 0.1
  552.  
  553. trailside22.Color = ColorSequence.new(ColorArray)
  554.  
  555. trailside22.Attachment0 = attt2
  556. trailside22.Attachment1 = attt4
  557. trailside22.Transparency = NumberSequence.new({
  558. NumberSequenceKeypoint.new(0, 0.5, 0),
  559. NumberSequenceKeypoint.new(1, 1, 0)
  560. })
  561.  
  562. local att1 = Instance.new("Attachment", c["Torso"])
  563. att1.Name = "att1"
  564. att1.Position = Vector3.new(1, 1, 0.5)
  565. local att2 = Instance.new("Attachment", c["Torso"])
  566. att2.Name = "att2"
  567. att2.Position = Vector3.new(-1, 1, 0.5)
  568. local att3 = Instance.new("Attachment", c["Torso"])
  569. att3.Name = "att3"
  570. att3.Position = Vector3.new(1, -1, 0.5)
  571. local att4 = Instance.new("Attachment", c["Torso"])
  572. att4.Name = "att4"
  573. att4.Position = Vector3.new(-1, -1, 0.5)
  574.  
  575. local attt1 = Instance.new("Attachment", c["Head"])
  576. attt1.Name = "att1"
  577. attt1.Position = Vector3.new(.55, .55, 0.025)
  578. local attt2 = Instance.new("Attachment", c["Head"])
  579. attt2.Name = "att2"
  580. attt2.Position = Vector3.new(-.55, .55, 0.025)
  581. local attt3 = Instance.new("Attachment", c["Head"])
  582. attt3.Name = "att3"
  583. attt3.Position = Vector3.new(.55, -.5, 0.025)
  584. local attt4 = Instance.new("Attachment", c["Head"])
  585. attt4.Name = "att4"
  586. attt4.Position = Vector3.new(-.55, -.5, 0.025)
  587. local trailtop1 = Instance.new("Trail", c["Torso"])
  588. trailtop1.Enabled = true
  589. trailtop1.Texture = "rbxassetid://16607923"
  590. trailtop1.Name = "toptrail"
  591. trailtop1.MinLength = 0
  592. trailtop1.Lifetime = 0.1
  593.  
  594. trailtop1.Color = ColorSequence.new(ColorArray)
  595.  
  596. trailtop1.Attachment0 = att1
  597. trailtop1.Attachment1 = att2
  598. trailtop1.Transparency = NumberSequence.new({
  599. NumberSequenceKeypoint.new(0, 0.5, 0),
  600. NumberSequenceKeypoint.new(1, 1, 0)
  601. })
  602. local trailbot1 = Instance.new("Trail", c["Torso"])
  603. trailbot1.Enabled = true
  604. trailbot1.Texture = "rbxassetid://16607923"
  605. trailbot1.Name = "bottrail"
  606. trailbot1.MinLength = 0
  607. trailbot1.Lifetime = 0.1
  608.  
  609. trailbot1.Color = ColorSequence.new(ColorArray)
  610.  
  611. trailbot1.Attachment0 = att3
  612. trailbot1.Attachment1 = att4
  613. trailbot1.Transparency = NumberSequence.new({
  614. NumberSequenceKeypoint.new(0, 0.5, 0),
  615. NumberSequenceKeypoint.new(1, 1, 0)
  616. })
  617. local trailside1 = Instance.new("Trail", c["Torso"])
  618. trailside1.Enabled = true
  619. trailside1.Texture = "rbxassetid://16607923"
  620. trailside1.Name = "sidetrail1"
  621. trailside1.MinLength = 0
  622. trailside1.Lifetime = 0.1
  623.  
  624. trailside1.Color = ColorSequence.new(ColorArray)
  625.  
  626. trailside1.Attachment0 = att1
  627. trailside1.Attachment1 = att3
  628. trailside1.Transparency = NumberSequence.new({
  629. NumberSequenceKeypoint.new(0, 0.5, 0),
  630. NumberSequenceKeypoint.new(1, 1, 0)
  631. })
  632. local trailside2 = Instance.new("Trail", c["Torso"])
  633. trailside2.Enabled = true
  634. trailside2.Texture = "rbxassetid://16607923"
  635. trailside2.Name = "sidetrail2"
  636. trailside2.MinLength = 0
  637. trailside2.Lifetime = 0.1
  638.  
  639. trailside2.Color = ColorSequence.new(ColorArray)
  640.  
  641. trailside2.Attachment0 = att2
  642. trailside2.Attachment1 = att4
  643. trailside2.Transparency = NumberSequence.new({
  644. NumberSequenceKeypoint.new(0, 0.5, 0),
  645. NumberSequenceKeypoint.new(1, 1, 0)
  646. })
  647. local trailtop12 = Instance.new("Trail", c["Head"])
  648. trailtop12.Enabled = true
  649. trailtop12.Texture = "rbxassetid://16607923"
  650. trailtop12.Name = "toptrail"
  651. trailtop12.MinLength = 0
  652. trailtop12.Lifetime = 0.1
  653.  
  654. trailtop12.Color = ColorSequence.new(ColorArray)
  655.  
  656. trailtop12.Attachment0 = attt1
  657. trailtop12.Attachment1 = attt2
  658. trailtop12.Transparency = NumberSequence.new({
  659. NumberSequenceKeypoint.new(0, 0.5, 0),
  660. NumberSequenceKeypoint.new(1, 1, 0)
  661. })
  662. local trailbot2 = Instance.new("Trail", c["Head"])
  663. trailbot2.Enabled = true
  664. trailbot2.Texture = "rbxassetid://16607923"
  665. trailbot2.Name = "bottrail"
  666. trailbot2.MinLength = 0
  667. trailbot2.Lifetime = 0.1
  668.  
  669. trailbot2.Color = ColorSequence.new(ColorArray)
  670.  
  671. trailbot2.Attachment0 = attt3
  672. trailbot2.Attachment1 = attt4
  673. trailbot2.Transparency = NumberSequence.new({
  674. NumberSequenceKeypoint.new(0, 0.5, 0),
  675. NumberSequenceKeypoint.new(1, 1, 0)
  676. })
  677. local trailside12 = Instance.new("Trail", c["Head"])
  678. trailside12.Enabled = true
  679. trailside12.Texture = "rbxassetid://16607923"
  680. trailside12.Name = "sidetrail1"
  681. trailside12.MinLength = 0
  682. trailside12.Lifetime = 0.1
  683.  
  684. trailside12.Color = ColorSequence.new(ColorArray)
  685.  
  686. trailside12.Attachment0 = attt1
  687. trailside12.Attachment1 = attt3
  688. trailside12.Transparency = NumberSequence.new({
  689. NumberSequenceKeypoint.new(0, 0.5, 0),
  690. NumberSequenceKeypoint.new(1, 1, 0)
  691. })
  692. local trailside22 = Instance.new("Trail", c["Head"])
  693. trailside22.Enabled = true
  694. trailside22.Texture = "rbxassetid://16607923"
  695. trailside22.Name = "sidetrail2"
  696. trailside22.MinLength = 0
  697. trailside22.Lifetime = 0.1
  698.  
  699. trailside22.Color = ColorSequence.new(ColorArray)
  700.  
  701. trailside22.Attachment0 = attt2 trailside22.Attachment1 = attt4
  702. trailside22.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.5, 0),NumberSequenceKeypoint.new(1, 1, 0)})
  703.  
  704. Sped = 0
  705.  
  706. function ragplayer(cactus)
  707. local S = Instance.new("Sound",c.HumanoidRootPart)S.SoundId = "rbxassetid://131026421" S.Volume = 2 S:Play()
  708. cactus.Humanoid.PlatformStand = true cactus:findFirstChild("Humanoid").Health = 0.01
  709. if cactus["Right Arm"]~=nil and cactus.Torso:FindFirstChild("Right Shoulder") then
  710. cactus.Torso:FindFirstChild("Right Shoulder"):Destroy()
  711. makegloo(cactus.Torso, RSC0, RSC1, cactus.Torso, cactus["Right Arm"], "Right Shoulder")
  712. maketouchy(cactus["Right Arm"], cactus["Right Arm"], CFrame.new(0, 0.5, 0))
  713. end
  714. if cactus["Left Arm"]~=nil and cactus.Torso:FindFirstChild("Left Shoulder") then
  715. cactus.Torso:FindFirstChild("Left Shoulder"):Destroy()
  716. makegloo(cactus.Torso, LSC0, LSC1, cactus.Torso, cactus["Left Arm"], "Left Shoulder")
  717. maketouchy(cactus["Left Arm"], cactus["Left Arm"], CFrame.new(0, 0.5, 0))
  718. end
  719. if cactus["Right Leg"]~=nil and cactus.Torso:FindFirstChild("Right Hip") then
  720. cactus.Torso:FindFirstChild("Right Hip"):Destroy()
  721. makegloo(cactus.Torso, RHC0, RHC1, cactus.Torso, cactus["Right Leg"], "Right Hip")
  722. maketouchy(cactus["Right Leg"], cactus["Right Leg"], CFrame.new(0, 0.5, 0))
  723. end
  724. if cactus["Left Leg"]~=nil and cactus.Torso:FindFirstChild("Left Hip") then
  725. cactus.Torso:FindFirstChild("Left Hip"):Destroy()
  726. makegloo(cactus.Torso, LHC0, LHC1, cactus.Torso, cactus["Left Leg"], "Left Hip")
  727. maketouchy(cactus["Left Leg"], cactus["Left Leg"], CFrame.new(0, 0.5, 0))
  728. end
  729. cactus.Parent = game.Workspace game.Debris:AddItem(cactus,15)
  730. end
  731. function makegloo(paren, co, ci, parto, parti, nam) local gloo = Instance.new("Glue") gloo.Name = nam gloo.C0 = co gloo.C1 = ci gloo.Part0 = parto gloo.Part1 = parti gloo.Parent = paren end
  732.  
  733. function maketouchy(parent, limb, cframe) local pr = Instance.new("Part") pr.Name = "touchy" pr.Size = Vector3.new(1, 1, 1) pr.Transparency = 1 pr.CustomPhysicalProperties = PhysicalProperties.new(0.55, 0.3, 0.5) pr.CanCollide = true pr.Anchored = false pr.Parent = parent local w = Instance.new("Weld") w.Part0 = pr w.Part1 = limb w.C0 = cframe w.Parent = pr end
  734.  
  735. local hitz = false
  736. c.HumanoidRootPart.Touched:connect(function(Hit)
  737. if thing >= 100 then
  738. if hitz == false then hitz = true
  739. ragplayer(c) local S = Instance.new("Sound",c.HumanoidRootPart)S.SoundId = "rbxassetid://386946017" S.Volume = 6 S:Play()
  740. wait(15)
  741. end
  742. end
  743. end)
  744.  
  745. function Spin()
  746. attack = true
  747. while attack == true do Sped = Sped + 0.25
  748. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(Sped*Sped*5), rd(0), rd(0)), 1)
  749. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(60), rd(0), rd(0)), 1)
  750. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(15), rd(25), rd(25)), 1)
  751. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  752. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(15), rd(-25), rd(-25)), 1)
  753. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  754. lerpz(RH, "C0", RHC0 * cf(0.5, 1.5, 0) * ang(rd(0), rd(0), rd(0)), 1)
  755. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  756. lerpz(LH, "C0", LHC0 * cf(-0.5, 1.5, 0) * ang(rd(0), rd(0), rd(0)), 1)
  757. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  758. swait()
  759. end
  760. end
  761.  
  762. SanicScreams = {585370931,202427593}
  763.  
  764. mouse.KeyDown:connect(function(key)
  765. if attack == true then return end
  766. if key == "q" then
  767. Spin()
  768. end
  769. if key == "e" then
  770. local S = Instance.new("Sound",c.HumanoidRootPart)S.SoundId = "rbxassetid://537371462" S.Volume = 10 S:Play()
  771. wait(1.25)
  772. local Sanic = SanicScreams[math.random(1,#SanicScreams)]
  773. local S = Instance.new("Sound",c.HumanoidRootPart)S.SoundId = "rbxassetid://"..Sanic S.Volume = 10 S:Play()
  774. spawn(function()
  775. local Sp = Instance.new("Part",game.Workspace)Sp.BrickColor = BrickColor.new("Cyan")Sp.Material = "Neon" Sp.Size = Vector3.new(1,1,1) Sp.Anchored = true Sp.CanCollide = false
  776. local SPM = Instance.new("SpecialMesh",Sp)SPM.MeshType = "Sphere" Sp.CFrame = c.HumanoidRootPart.CFrame
  777. for i = 1,25 do
  778. SPM.Scale = SPM.Scale + Vector3.new(4,4,4)
  779. Sp.Transparency = Sp.Transparency + 1/25
  780. swait()
  781. end
  782. end)
  783. local S = Instance.new("Sound",c.HumanoidRootPart)S.SoundId = "rbxassetid://214444596" S.Volume = 10 S:Play()
  784. Sped = 10000000000
  785. end
  786. end)
  787.  
  788. mouse.KeyUp:connect(function(key)
  789. if key == "q" then
  790. attack = false
  791. end
  792. end)
  793.  
  794. local P = Instance.new("Part",game.Workspace.CurrentCamera)P.CanCollide = true P.Anchored = true P.Size = Vector3.new(15,1,15)
  795. P.CFrame = CFrame.new(c.HumanoidRootPart.Position)*CFrame.new(0,-3.5,0)P.Transparency = 0 P.Name = "FlightPart"
  796. P.BrickColor = BrickColor.new("Dark green") P.TopSurface = "Smooth" P.Material = "Grass"
  797. spawn(function()
  798. while true do
  799. P.CFrame = CFrame.new(c.HumanoidRootPart.Position.X,-0.6,c.HumanoidRootPart.Position.Z)
  800. swait()
  801. end
  802. end)
  803.  
  804. anim.Parent = nil
  805. sine = 0
  806.  
  807. game:GetService("RunService").RenderStepped:connect(function()
  808. if attack == false then
  809. thing = (c.HumanoidRootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  810. game.Workspace.CurrentCamera.FieldOfView = 70+thing/100
  811. if c.HumanoidRootPart.Velocity.Y > 1 then sine = sine + 1
  812. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(sine*thing*0.75), rd(0), rd(0)), 1)
  813. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(60), rd(0), rd(0)), 1)
  814. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(15), rd(25), rd(25)), 1)
  815. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  816. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(15), rd(-25), rd(-25)), 1)
  817. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  818. lerpz(RH, "C0", RHC0 * cf(0.5, 1.5, 0) * ang(rd(0), rd(0), rd(0)), 1)
  819. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  820. lerpz(LH, "C0", LHC0 * cf(-0.5, 1.5, 0) * ang(rd(0), rd(0), rd(0)), 1)
  821. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  822. elseif (c.HumanoidRootPart.Velocity * Vector3.new(1, 0, 1)).magnitude > 2 then
  823. sine = sine + 1 Sped = Sped + 0.1
  824. if thing <= 200 then
  825. if S2.PlaybackSpeed >= 1 then
  826. S2.PlaybackSpeed = 1
  827. else
  828. S2.PlaybackSpeed = thing/80
  829. end
  830. c.Humanoid.WalkSpeed = 16+(thing/1.5)+Sped
  831. S2.Volume = thing/20
  832. end
  833. if thing <= 200 then
  834. c.Humanoid.WalkSpeed = 16+(thing/1.5)+Sped
  835. S2.Volume = thing/20
  836. else
  837. c.Humanoid.WalkSpeed = 16+(thing/1.5)+Sped
  838. end
  839. if thing <= 100 then
  840. for i,v in pairs(c:children()) do
  841. if v.ClassName == "Part" then
  842. for i,v2 in pairs(v:children()) do
  843. if v2.ClassName == "Trail" then
  844. v2.Enabled = false
  845. v2.LightEmission = 1
  846. end
  847. end
  848. end
  849. end
  850. else
  851. for i,v in pairs(c:children()) do
  852. if v.ClassName == "Part" then
  853. for i,v2 in pairs(v:children()) do
  854. if v2.ClassName == "Trail" then
  855. v2.Lifetime = 2
  856. v2.Enabled = true
  857. end
  858. end
  859. end
  860. end
  861. end
  862. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(thing/7), rd(0), rd(0)), 1)
  863. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  864. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(-thing/1.5)), 1)
  865. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  866. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(thing/1.5)), 1)
  867. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  868. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(math.cos(sine/2))*thing/1.25), 1)
  869. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  870. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(math.cos(sine/2))*thing/1.25), 1)
  871. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 1)
  872. else c.Humanoid.WalkSpeed = 16 Sped = 0 sine = sine + 1 S2.Volume = 0 S2.PlaybackSpeed = 0
  873. lerpz(RJ, "C0", RJC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  874. lerpz(N, "C0", NC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  875. lerpz(RS, "C0", RSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(math.cos(sine/24)*4)), 0.5)
  876. lerpz(RS, "C1", RSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  877. lerpz(LS, "C0", LSC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(math.cos(sine/24)*4)), 0.5)
  878. lerpz(LS, "C1", LSC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  879. lerpz(RH, "C0", RHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  880. lerpz(RH, "C1", RHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  881. lerpz(LH, "C0", LHC0 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  882. lerpz(LH, "C1", LHC1 * cf(0, 0, 0) * ang(rd(0), rd(0), rd(0)), 0.5)
  883. end
  884. for i,v in pairs (c:children()) do
  885. if v.ClassName == "Accessory" then
  886. for i,v2 in pairs (v:children()) do
  887. if v2.ClassName == "Part" then
  888. v2.Anchored = false
  889. end
  890. end
  891. end
  892. for i,v in pairs (c:children()) do
  893. if v.ClassName == "Part" then
  894. v.Anchored = false
  895. end
  896. end
  897. end
  898. end
  899. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement