Advertisement
FireyBFDI

SONICUUU

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