Advertisement
Dark_AJ1

sanic

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