Advertisement
SCP-682-A

Super Mario Dingoes

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