Advertisement
memberhero

FE Gaster Blaster Script

Jan 21st, 2019
5,669
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[ Script Converted by WafflesAreVeryGood (Nobody#3907 on discord) ]]--
  2. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  3. do
  4. script.Parent = owner.Character
  5. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  6. local function NewFakeEvent()
  7. local Bind = Instance.new("BindableEvent")
  8. local Fake;Fake = {Connections = {},
  9. fakeEvent=true;
  10. Connect=function(self,Func)
  11. Bind.Event:connect(Func)
  12. self.Connections[Bind] = true
  13. return setmetatable({Connected = true},{
  14. __index = function (self,Index)
  15. if Index:lower() == "disconnect" then
  16. return function() Fake.Connections[Bind] = false;self.Connected = false end
  17. end
  18. return Fake[Index]
  19. end;
  20. __tostring = function() return "Connection" end;
  21. })
  22. end}
  23. Fake.connect = Fake.Connect;return Fake;
  24. end
  25. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  26. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  27. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  28. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  29. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  30. local function TriggerEvent(self,Event,...)
  31. local Trigger = Mouse[Event]
  32. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  33. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  34. end
  35. end
  36. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  37. Event.OnServerEvent:Connect(function(FiredBy,Input)
  38. if FiredBy.Name ~= owner.Name then return end
  39. if Input.MouseEvent then
  40. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  41. else
  42. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  43. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  44. for _,Action in pairs(ContextActionService.Actions) do
  45. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  46. end
  47. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  48. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  49. end
  50. end)
  51. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  52. Event.Parent = NLS([[
  53. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  54. local Input = function(Input,gameProcessedEvent)
  55. if gameProcessedEvent then return end
  56. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  57. end
  58. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  59. local Hit,Target
  60. while wait(1/30) do
  61. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  62. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  63. end
  64. end
  65. ]],owner.Character)
  66. end
  67. RealGame = game;game = setmetatable({},{
  68. __index = function (self,Index)
  69. local Sandbox = function (Thing)
  70. if Thing:IsA("Player") then
  71. local RealPlayer = Thing
  72. return setmetatable({},{
  73. __index = function (self,Index)
  74. local Type = type(RealPlayer[Index])
  75. if Type == "function" then
  76. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  77. return function (self)return InternalData["Mouse"] end
  78. end
  79. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  80. end
  81. return RealPlayer[Index]
  82. end;
  83. __tostring = function(self) return RealPlayer.Name end
  84. })
  85. end
  86. end
  87. if RealGame[Index] then
  88. local Type = type(RealGame[Index])
  89. if Type == "function" then
  90. if Index:lower() == "getservice" or Index:lower() == "service" then
  91. return function (self,Service)
  92. local FakeServices = {
  93. ["players"] = function()
  94. return setmetatable({},{
  95. __index = function (self2,Index2)
  96. local RealService = RealGame:GetService(Service)
  97. local Type2 = type(Index2)
  98. if Type2 == "function" then
  99. return function (self,...) return RealService[Index2](RealService,...)end
  100. else
  101. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  102. return RealService[Index2]
  103. end
  104. end;
  105. __tostring = function(self) return RealGame:GetService(Service).Name end
  106. })
  107. end;
  108. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  109. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  110. ["runservice"] = function()
  111. return setmetatable({},{
  112. __index = function(self2,Index2)
  113. local RealService = RealGame:GetService(Service)
  114. local Type2 = type(Index2)
  115. if Type2 == "function" then
  116. return function (self,...) return RealService[Index2](RealService,...) end
  117. else
  118. local RunServices = {
  119. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  120. ["renderstepped"] = function() return RealService["Stepped"] end
  121. }
  122. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  123. return RealService[Index2]
  124. end
  125. end
  126. })
  127. end
  128. }
  129. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  130. return RealGame:GetService(Service)
  131. end
  132. end
  133. return function (self,...) return RealGame[Index](RealGame,...) end
  134. else
  135. if game:GetService(Index) then return game:GetService(Index) end
  136. return RealGame[Index]
  137. end
  138. end
  139. return nil
  140. end
  141. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  142. wait(0.2)
  143. local plr = game:GetService('Players').LocalPlayer
  144. local char = plr.Character
  145. local mouse = plr:GetMouse()
  146. --Converted with ttyyuu12345's model to script plugin v4
  147. function sandbox(var,func)
  148. local env = getfenv(func)
  149. local newenv = setmetatable({},{
  150. __index = function(self,k)
  151. if k=="script" then
  152. return var
  153. else
  154. return env[k]
  155. end
  156. end,
  157. })
  158. setfenv(func,newenv)
  159. return func
  160. end
  161. cors = {}
  162. mas = Instance.new("Model",game:GetService("Lighting"))
  163. Tool0 = Instance.new("Tool")
  164. Folder1 = Instance.new("Folder")
  165. Sound2 = Instance.new("Sound")
  166. Model3 = Instance.new("Model")
  167. Part4 = Instance.new("Part")
  168. SpecialMesh5 = Instance.new("SpecialMesh")
  169. ManualWeld6 = Instance.new("ManualWeld")
  170. ManualWeld7 = Instance.new("ManualWeld")
  171. ManualWeld8 = Instance.new("ManualWeld")
  172. WedgePart9 = Instance.new("WedgePart")
  173. Part10 = Instance.new("Part")
  174. SpecialMesh11 = Instance.new("SpecialMesh")
  175. Script12 = Instance.new("Script")
  176. Part13 = Instance.new("Part")
  177. ParticleEmitter14 = Instance.new("ParticleEmitter")
  178. Part15 = Instance.new("Part")
  179. ParticleEmitter16 = Instance.new("ParticleEmitter")
  180. Animation17 = Instance.new("Animation")
  181. Tool0.Name = "Gaster Blaster"
  182. Tool0.Parent = mas
  183. Tool0.TextureId = "rbxassetid://382220657"
  184. Tool0.ToolTip = "Gaster Blaster: Used By Sans"
  185. Tool0.CanBeDropped = false
  186. Folder1.Parent = Tool0
  187. Sound2.Name = "GBSound"
  188. Sound2.Parent = Folder1
  189. Sound2.SoundId = "rbxassetid://382265669"
  190. Sound2.Volume = 1
  191. Model3.Name = "GB"
  192. Model3.Parent = Folder1
  193. Model3.PrimaryPart = Part4
  194. Part4.Name = "Main"
  195. Part4.Parent = Model3
  196. Part4.Material = Enum.Material.SmoothPlastic
  197. Part4.BrickColor = BrickColor.new("Institutional white")
  198. Part4.Rotation = Vector3.new(178.669998, -0.049999997, 179.819992)
  199. Part4.Anchored = true
  200. Part4.CanCollide = false
  201. Part4.FormFactor = Enum.FormFactor.Custom
  202. Part4.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  203. Part4.CFrame = CFrame.new(9.6476717, 212.837067, 62.5175667, -0.999994874, -0.0030922927, -0.000849041739, -0.00307168509, 0.999724269, -0.0232850946, 0.000920811843, -0.0232823677, -0.99972856)
  204. Part4.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  205. Part4.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  206. Part4.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  207. Part4.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  208. Part4.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  209. Part4.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  210. Part4.Color = Color3.new(0.972549, 0.972549, 0.972549)
  211. Part4.Position = Vector3.new(9.6476717, 212.837067, 62.5175667)
  212. Part4.Orientation = Vector3.new(1.32999992, -179.949997, -0.179999992)
  213. Part4.Color = Color3.new(0.972549, 0.972549, 0.972549)
  214. SpecialMesh5.Parent = Part4
  215. SpecialMesh5.MeshId = "http://www.roblox.com/asset/?id=14028428"
  216. SpecialMesh5.Scale = Vector3.new(4.23171806, 4.23171759, 4.23171663)
  217. SpecialMesh5.VertexColor = Vector3.new(1000000, 10000, 10000)
  218. SpecialMesh5.MeshType = Enum.MeshType.FileMesh
  219. SpecialMesh5.Scale = Vector3.new(4.23171806, 4.23171759, 4.23171663)
  220. ManualWeld6.Name = "Weld"
  221. ManualWeld6.Parent = Part4
  222. ManualWeld6.C0 = CFrame.new(0, 0, 0, -0.999994874, -0.00307097379, 0.000981842401, -0.00309300236, 0.99972415, -0.0232822727, -0.000910072413, -0.0232851878, -0.999728441)
  223. ManualWeld6.C1 = CFrame.new(0.225479126, 3.69114685, 0.0936775208, -0.0154458769, 0.34394905, 0.93886131, 0.0187007096, 0.938908398, -0.343658656, -0.999705911, 0.0122492611, -0.0209343527)
  224. ManualWeld6.Part0 = Part4
  225. ManualWeld6.Part1 = nil
  226. ManualWeld7.Name = "Weld"
  227. ManualWeld7.Parent = Part4
  228. ManualWeld7.C0 = CFrame.new(0, 0, 0, -0.999994874, -0.00307097379, 0.000981842401, -0.00309300236, 0.99972415, -0.0232822727, -0.000910072413, -0.0232851878, -0.999728441)
  229. ManualWeld7.C1 = CFrame.new(0.141029358, 4.85009766, 0.616783142, -0.872494459, -0.293409586, 0.390722692, -0.0644136816, 0.861726344, 0.503268003, -0.484359652, 0.413930595, -0.770751119)
  230. ManualWeld7.Part0 = Part4
  231. ManualWeld7.Part1 = nil
  232. ManualWeld8.Name = "Weld"
  233. ManualWeld8.Parent = Part4
  234. ManualWeld8.C0 = CFrame.new(0, 0, 0, -0.999994874, -0.00307097379, 0.000981842401, -0.00309300236, 0.99972415, -0.0232822727, -0.000910072413, -0.0232851878, -0.999728441)
  235. ManualWeld8.C1 = CFrame.new(0.0476670265, 0.962097168, 5.07106781, 1, 3.98733209e-05, -1.65144629e-05, -1.65144629e-05, 0.707063794, 0.707141817, 3.98733209e-05, -0.707141817, 0.707063794)
  236. ManualWeld8.Part0 = Part4
  237. ManualWeld8.Part1 = WedgePart9
  238. WedgePart9.Parent = Model3
  239. WedgePart9.BrickColor = BrickColor.new("Institutional white")
  240. WedgePart9.Rotation = Vector3.new(45, 0, 0)
  241. WedgePart9.CanCollide = false
  242. WedgePart9.FormFactor = Enum.FormFactor.Symmetric
  243. WedgePart9.Size = Vector3.new(1.60000014, 1.5999999, 4.4000001)
  244. WedgePart9.CFrame = CFrame.new(9.59999466, 215.742599, 58.2514572, 1, 1.65165984e-05, -3.98718948e-05, -3.98723896e-05, 0.707119346, -0.707094252, 1.65153942e-05, 0.707094252, 0.707119346)
  245. WedgePart9.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  246. WedgePart9.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  247. WedgePart9.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  248. WedgePart9.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  249. WedgePart9.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  250. WedgePart9.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  251. WedgePart9.Color = Color3.new(0.972549, 0.972549, 0.972549)
  252. WedgePart9.Position = Vector3.new(9.59999466, 215.742599, 58.2514572)
  253. WedgePart9.Orientation = Vector3.new(45, 0, 0)
  254. WedgePart9.Color = Color3.new(0.972549, 0.972549, 0.972549)
  255. Part10.Name = "GBBeam"
  256. Part10.Parent = Folder1
  257. Part10.Material = Enum.Material.SmoothPlastic
  258. Part10.BrickColor = BrickColor.new("Institutional white")
  259. Part10.Material = Enum.Material.Neon
  260. Part10.Rotation = Vector3.new(0, 90, 0)
  261. Part10.Anchored = true
  262. Part10.CanCollide = false
  263. Part10.FormFactor = Enum.FormFactor.Custom
  264. Part10.Size = Vector3.new(200, 6, 6)
  265. Part10.CFrame = CFrame.new(-2.50004816, 4.40002823, -1021.19995, 5.34682295e-05, 1.23517841e-13, 1, -4.3159529e-05, 1, 2.30754016e-09, -1, -4.3159529e-05, 5.34682331e-05)
  266. Part10.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  267. Part10.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  268. Part10.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  269. Part10.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  270. Part10.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  271. Part10.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  272. Part10.Color = Color3.new(1, 1, 1)
  273. Part10.Position = Vector3.new(-2.50004816, 4.40002823, -1021.19995)
  274. Part10.Orientation = Vector3.new(0, 90, 0)
  275. Part10.Color = Color3.new(1, 1, 1)
  276. SpecialMesh11.Parent = Part10
  277. SpecialMesh11.MeshType = Enum.MeshType.Sphere
  278. Script12.Parent = Part10
  279. Script12.Disabled = true
  280. Part13.Name = "HandFlame"
  281. Part13.Parent = Folder1
  282. Part13.Transparency = 1
  283. Part13.Rotation = Vector3.new(0, 0, -30)
  284. Part13.Anchored = true
  285. Part13.CanCollide = false
  286. Part13.FormFactor = Enum.FormFactor.Custom
  287. Part13.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  288. Part13.CFrame = CFrame.new(-8.29995918, 203.950241, 50.9999504, 0.866004944, 0.500030637, -2.15781438e-05, -0.500030637, 0.866004944, 3.73764087e-05, 3.73764087e-05, -2.15781438e-05, 1)
  289. Part13.Position = Vector3.new(-8.29995918, 203.950241, 50.9999504)
  290. Part13.Orientation = Vector3.new(0, 0, -30)
  291. ParticleEmitter14.Name = "Flame"
  292. ParticleEmitter14.Parent = Part13
  293. ParticleEmitter14.Transparency = NumberSequence.new(0.69999998807907,0.69999998807907,0.94999998807907,1)
  294. ParticleEmitter14.Rotation = NumberRange.new(-180, 180)
  295. ParticleEmitter14.Size = NumberSequence.new(0.5,0.5)
  296. ParticleEmitter14.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(0, 0, 0))
  297. ParticleEmitter14.LightEmission = 1
  298. ParticleEmitter14.Texture = "http://www.roblox.com/asset/?id=298319954"
  299. ParticleEmitter14.ZOffset = 0.5
  300. ParticleEmitter14.Lifetime = NumberRange.new(4, 9)
  301. ParticleEmitter14.Rate = 500
  302. ParticleEmitter14.Speed = NumberRange.new(2, 2)
  303. ParticleEmitter14.VelocitySpread = 45
  304. ParticleEmitter14.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(0, 0, 0))
  305. local clone = ParticleEmitter14:Clone()
  306. clone.Size = NumberSequence.new(2,0)
  307. clone.Transparency = NumberSequence.new(0,0.5,0.9,1)
  308. clone.Parent = Part10
  309. Part15.Name = "HeadFlame"
  310. Part15.Parent = Folder1
  311. Part15.Transparency = 1
  312. Part15.Rotation = Vector3.new(0, 0, 79.6899948)
  313. Part15.Anchored = true
  314. Part15.CanCollide = false
  315. Part15.FormFactor = Enum.FormFactor.Custom
  316. Part15.Size = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  317. Part15.CFrame = CFrame.new(-10.0999317, 211.071381, 50.400013, 0.178991079, -0.983850658, -4.29847787e-05, 0.983850658, 0.178991094, 3.88006174e-06, 3.87649106e-06, -4.29850988e-05, 1)
  318. Part15.Position = Vector3.new(-10.0999317, 211.071381, 50.400013)
  319. Part15.Orientation = Vector3.new(0, 0, 79.6899948)
  320. ParticleEmitter16.Name = "Flame"
  321. ParticleEmitter16.Parent = Part15
  322. ParticleEmitter16.Transparency = NumberSequence.new(0.69999998807907,0.89999997615814,1)
  323. ParticleEmitter16.Rotation = NumberRange.new(-180, 180)
  324. ParticleEmitter16.Size = NumberSequence.new(0.5,0.5)
  325. ParticleEmitter16.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(1, 0, 0))
  326. ParticleEmitter16.LightEmission = 1
  327. ParticleEmitter16.Texture = "http://www.roblox.com/asset/?id=134531489"
  328. ParticleEmitter16.Acceleration = Vector3.new(0, 20, 0)
  329. ParticleEmitter16.Lifetime = NumberRange.new(0.60000002384186, 0.60000002384186)
  330. ParticleEmitter16.Rate = 500
  331. ParticleEmitter16.Speed = NumberRange.new(10, 10)
  332. ParticleEmitter16.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(0, 0, 0))
  333. Animation17.Name = "GBSend"
  334. Animation17.Parent = Folder1
  335. Animation17.AnimationId = "http://www.roblox.com/GBSend-item?id=388238523"
  336. for i,v in pairs(mas:GetChildren()) do
  337. v.Parent = game:GetService("Players").LocalPlayer.Character
  338. pcall(function() v:MakeJoints() end)
  339. end
  340. mas:Destroy()
  341. for i,v in pairs(cors) do
  342. spawn(function()
  343. pcall(v)
  344. end)
  345. end
  346. Tool0.RequiresHandle = false
  347. local tool = char["Gaster Blaster"]
  348. for i,v in pairs(tool.Folder:GetChildren()) do
  349. v.Parent = script
  350. end
  351. script.Parent = tool
  352. tool.Parent = plr.Backpack
  353. local hum=char:WaitForChild("Humanoid")
  354. local torso=char:WaitForChild("Torso")
  355. local hrp=char:WaitForChild("HumanoidRootPart")
  356. local check=false
  357. local dmg=false
  358. local combo=false
  359. local comboing=false
  360. local gb=script.GB
  361. local gbsend=hum:LoadAnimation(script.GBSend)
  362. local equipped=false
  363. local tool=script.Parent
  364. local closest=nil
  365. crosstab={
  366. [1]={math.cos(math.rad(45)),math.sin(math.rad(45))},
  367. [2]={math.cos(math.rad(135)),math.sin(math.rad(135))},
  368. [3]={math.cos(math.rad(225)),math.sin(math.rad(225))},
  369. [4]={math.cos(math.rad(315)),math.sin(math.rad(315))}
  370. }
  371. local attacklist={}
  372. local rignore={}
  373. local lgb=nil
  374. local rgb=nil
  375. local lgbbp=nil
  376. local rgbbp=nil
  377. local lgbbg=nil
  378. local rgbbg=nil
  379. local headf=nil
  380. local handf=nil
  381.  
  382. for _,v in pairs(workspace:GetChildren()) do
  383. if not v:FindFirstChild("Humanoid") then
  384. table.insert(rignore,v)
  385. end
  386. end
  387.  
  388. function Loop()
  389. coroutine.resume(coroutine.create(function()
  390. while equipped==true do
  391. repeat wait() until rgb:FindFirstChild("Main") and lgb:FindFirstChild("Main")
  392. rgb.Main.Velocity = Vector3.new()
  393. lgb.Main.Velocity = Vector3.new()
  394. rgbbp.Position=(hrp.CFrame*CFrame.new(10,5,0)).p
  395. lgbbp.Position=(hrp.CFrame*CFrame.new(-10,5,0)).p
  396. rgbbg.CFrame=CFrame.new(rgb.Main.Position,mouse.Hit.p)
  397. lgbbg.CFrame=CFrame.new(lgb.Main.Position,mouse.Hit.p)
  398. rgb.Main.Anchored = false
  399. lgb.Main.Anchored = false
  400. wait()
  401. end
  402. end))
  403. end
  404.  
  405. local function PrepareHurt(proj,dmgcheck,dmg)
  406. return --[[
  407. local ray=Ray.new((proj.CFrame*CFrame.new(-proj.Size.X/2,0,0)).p,(hitpos-(proj.CFrame*CFrame.new(-proj.Size.X/2,0,0)).p).unit*100)
  408. for _,v in pairs(workspace:GetChildren()) do
  409. if v.Name=="GBBeam" then
  410. table.insert(rignore,v)
  411. end
  412. end
  413. local hit=workspace:FindPartOnRayWithIgnoreList(ray,rignore)
  414. if hit then
  415. if hit.Parent:FindFirstChild("Humanoid") and hit.Parent.Name~=plr.Name then
  416. if hit.Parent.Humanoid.Health>0 then
  417. hit.Parent.Humanoid:TakeDamage(dmg)
  418. end
  419. end
  420. end]]
  421. end
  422. function fakescript(beamasd)
  423. local script = {Parent = beamasd}
  424. local key=math.random()
  425.  
  426. function onTouched(hit)
  427. local human = hit.Parent:FindFirstChildOfClass("Humanoid")
  428. --Basically this just checks to see if it is a real player touching this brick.
  429. if (human ~= nil) and hit.Parent ~= char then --If it is a real player, then DESTROY THEM!
  430. print("y'all")
  431. human.Health = human.Health - 7.5*(1-script.Parent.Transparency)
  432. end
  433. end
  434.  
  435.  
  436. if (script.Parent ~= nil) and (script.Parent.className == "Part") then --Work if in a block
  437. connection = script.Parent.Touched:connect(onTouched)
  438. end
  439. local beam=script.Parent
  440. local bp = Instance.new("BodyPosition")
  441. bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  442. bp.Position = beam.Position
  443. bp.Parent = beam
  444. beam.Anchored = false
  445. coroutine.resume(coroutine.create(function()
  446. wait(0.3)
  447. for i=1,10 do
  448. if not beam:FindFirstChild"Mesh" then return end
  449. beam.Mesh.Scale=Vector3.new(1,1-(i/9),1-(i/9))
  450. wait()
  451. end
  452. end))
  453. wait(0.4)
  454. for i=1,15 do
  455. bp.Position = beam.Position
  456. beam.Transparency=i/15
  457. wait()
  458. end
  459. wait()
  460. beam:Destroy()
  461. end
  462. local function FIRE(obj,mode,thitpos)
  463. coroutine.resume(coroutine.create(function()
  464. if mode=="Normal" then
  465. obj.Main.CFrame=hrp.CFrame*CFrame.new(math.random(-100,100),math.random(0,200),math.random(-100,100))
  466. end
  467. local dmgcheck=false
  468. local gbsfx=script.GBSound:Clone()
  469. gbsfx.Parent=obj.Main
  470. gbsfx:Play()
  471. game.Debris:AddItem(gbsfx,3)
  472. wait(1)
  473. local beam=script.GBBeam:Clone()
  474. beam.CFrame=obj.Main.CFrame*CFrame.new(0,-3,1)
  475. spawn(function()
  476. fakescript(beam)
  477. end)
  478. beam.Size=Vector3.new(((beam.CFrame*CFrame.new(0,0,-beam.Size.X/2)).p-hitpos).magnitude*2,beam.Size.Y,beam.Size.Z)
  479. if mode~="Dual" then
  480. beam.CFrame=CFrame.new(beam.Position,thitpos)*CFrame.Angles(0,math.pi/2,0)
  481. else
  482. beam.CFrame=CFrame.new(beam.Position,mouse.Hit.p)*CFrame.Angles(0,math.pi/2,0)
  483. end
  484. beam.CFrame=beam.CFrame*CFrame.new(beam.Size.X/2,0,0)
  485. beam.Transparency=0
  486. local m = Instance.new("SpecialMesh")
  487. beam.BrickColor = BrickColor.Red()
  488. m.MeshType = "Sphere"
  489. m.Parent = beam
  490. beam.Mesh.Scale=Vector3.new(1,1,1)
  491. --PrepareHurt(beam,dmgcheck,10)
  492. beam.Parent = char
  493. if mode=="Dual" then
  494. end
  495. end))
  496. end
  497.  
  498. local function Lerp(obj,kind,nb,total,spec)
  499. obj.Main.Anchored=false
  500. local bodyp=Instance.new("BodyPosition",obj.Main)
  501. bodyp.MaxForce=Vector3.new(math.huge,math.huge,math.huge)
  502. bodyp.D=100
  503. bodyp.P=1000
  504. local gyro=Instance.new("BodyGyro",obj.Main)
  505. gyro.MaxTorque=Vector3.new(10000,10000,10000)
  506. gyro.D=80
  507. if kind=="Front" then
  508. obj.CFrame=hrp.CFrame*CFrame.new(math.random(-10,10),math.random(0,5),-5)
  509. end
  510. coroutine.resume(coroutine.create(function()
  511. wait()
  512. gyro.CFrame=CFrame.new(obj.Main.Position,hitpos)
  513. wait(0.5)
  514. gyro.CFrame=CFrame.new(obj.Main.Position,hitpos)
  515. end))
  516. if kind=="Line" then
  517. if total==0 then
  518. bodyp.Position=hrp.Position+Vector3.new(0,10,0)
  519. elseif total==2 then
  520. if nb==1 then
  521. bodyp.Position=hrp.Position+Vector3.new(5,0,4)
  522. elseif nb==2 then
  523. bodyp.Position=hrp.Position+Vector3.new(-5,0,4)
  524. end
  525. elseif total==6 then
  526. if nb==1 then
  527. bodyp.Position=(hrp.CFrame*CFrame.new(-30,1,0)).p
  528. elseif nb==2 then
  529. bodyp.Position=(hrp.CFrame*CFrame.new(-20,1,0)).p
  530. elseif nb==3 then
  531. bodyp.Position=(hrp.CFrame*CFrame.new(-10,1,0)).p
  532. elseif nb==4 then
  533. bodyp.Position=(hrp.CFrame*CFrame.new(10,1,0)).p
  534. elseif nb==5 then
  535. bodyp.Position=(hrp.CFrame*CFrame.new(20,1,0)).p
  536. elseif nb==6 then
  537. bodyp.Position=(hrp.CFrame*CFrame.new(30,1,0)).p
  538. end
  539. end
  540. elseif kind=="Circle" then
  541. if spec=="Cross" then
  542. bodyp.Position=hitpos+Vector3.new(crosstab[nb][1],3/50,crosstab[nb][2])*50
  543. elseif spec=="Plus" or spec=="Total" then
  544. bodyp.Position=hitpos+Vector3.new(math.cos(math.rad(nb*(360/total))),3/50,math.sin(math.rad(nb*(360/total))))*50
  545. end
  546. end
  547. end
  548. function debris(obj, t)
  549. spawn(function()
  550. wait(t)
  551. for i = 1, 10 do
  552. for _,v in pairs(obj:GetChildren()) do
  553. if v:IsA("BasePart") and v.Transparency < 1 then
  554. v.Transparency = i/10
  555. end
  556. end
  557. game:GetService('RunService').Stepped:wait(0)
  558. end
  559. for _,v in pairs(obj:GetChildren()) do
  560. v:Destroy()
  561. end
  562. end)
  563. end
  564. hum.MaxHealth = math.huge
  565. hum.MaxHealth = math.huge
  566. local function PrepareAttack(key)
  567. if check==false and hum.Health>0 then
  568. if closest==nil then
  569. hitpos=mouse.Hit.p
  570. else
  571. hitpos=closest.Torso.Position
  572. end
  573. if equipped==true then
  574. if key=="q" then
  575. combo=true
  576. elseif key=="e" then
  577. if combo==false then
  578. check=true
  579. hum.WalkSpeed=0
  580. gbsend:Play()
  581. local gbc=gb:Clone()
  582. gbc.Parent=char
  583. gbc.Main.CFrame=hrp.CFrame*CFrame.new(math.random(-100,100),math.random(0,200),math.random(-100,100))
  584. Lerp(gbc,"Line",0,0)
  585. FIRE(gbc,"Normal",hitpos)
  586. hum.WalkSpeed=30
  587. debris(gbc, 1.8)
  588. if comboing==false then
  589. wait(1)
  590. else
  591. wait(0.25)
  592. end
  593. check=false
  594. elseif combo==true and #attacklist<5 then
  595. table.insert(attacklist,key)
  596. end
  597. elseif key=="r" then
  598. if combo==false then
  599. check=true
  600. hum.WalkSpeed=0
  601. gbsend:Play()
  602. FIRE(lgb,"Dual",hitpos)
  603. FIRE(rgb,"Dual",hitpos)
  604. hum.WalkSpeed=30
  605. if comboing==false then
  606. wait(1.5)
  607. else
  608. wait(0.325)
  609. end
  610. check=false
  611. elseif combo==true and #attacklist<5 then
  612. table.insert(attacklist,key)
  613. end
  614. elseif key=="t" then
  615. if combo==false then
  616. check=true
  617. hum.WalkSpeed=0
  618. gbsend:Play()
  619. for i=1,12 do
  620. local gbc=gb:Clone()
  621. gbc.Parent=char
  622. debris(gbc, 1.8)
  623. gbc.Main.CFrame=hrp.CFrame*CFrame.new(math.random(-100,100),math.random(0,200),math.random(-100,100))
  624. coroutine.resume(coroutine.create(function()
  625. Lerp(gbc,"Circle",i,12,"Total")
  626. FIRE(gbc,"Normal",hitpos)
  627. end))
  628. wait(0.05)
  629. end
  630. hum.WalkSpeed=30
  631. if comboing==false then
  632. wait(7)
  633. else
  634. wait(5)
  635. end
  636. check=false
  637. elseif combo==true and #attacklist==4 then
  638. table.insert(attacklist,key)
  639. end
  640. elseif key=="f" then
  641. if combo==false then
  642. check=true
  643. hum.WalkSpeed=0
  644. gbsend:Play()
  645. for i=1,4 do
  646. local gbc=gb:Clone()
  647. gbc.Parent=char
  648. debris(gbc, 1.8)
  649. coroutine.resume(coroutine.create(function()
  650. Lerp(gbc,"Circle",i,4,"Plus")
  651. FIRE(gbc,"Normal",hitpos)
  652. end))
  653. end
  654. hum.WalkSpeed=30
  655. if comboing==false then
  656. wait(2)
  657. else
  658. wait(0.5)
  659. end
  660. check=false
  661. elseif combo==true and #attacklist<5 then
  662. table.insert(attacklist,key)
  663. end
  664. elseif key=="g" then
  665. if combo==false then
  666. check=true
  667. hum.WalkSpeed=0
  668. gbsend:Play()
  669. for i=1,4 do
  670. local gbc=gb:Clone()
  671. gbc.Parent=char
  672. debris(gbc, 1.8)
  673. coroutine.resume(coroutine.create(function()
  674. Lerp(gbc,"Circle",i,4,"Cross")
  675. FIRE(gbc,"Normal",hitpos)
  676. end))
  677. end
  678. hum.WalkSpeed=30
  679. if comboing==false then
  680. wait(2)
  681. else
  682. wait(0.5)
  683. end
  684. check=false
  685. elseif combo==true and #attacklist<5 then
  686. table.insert(attacklist,key)
  687. end
  688. elseif key=="h" then
  689. if combo==false then
  690. check=true
  691. hum.WalkSpeed=0
  692. gbsend:Play()
  693. for i=1,8 do
  694. local gbc=gb:Clone()
  695. gbc.Parent=char
  696. debris(gbc, 1.8)
  697. coroutine.resume(coroutine.create(function()
  698. Lerp(gbc,"Circle",i,8,"Total")
  699. FIRE(gbc,"Normal",hitpos)
  700. end))
  701. end
  702. hum.WalkSpeed=30
  703. if comboing==false then
  704. wait(2)
  705. else
  706. wait(.5)
  707. end
  708. check=false
  709. elseif combo==true and #attacklist<3 then
  710. table.insert(attacklist,key)
  711. end
  712. end
  713. end
  714. end
  715. end
  716.  
  717. mouse.KeyUp:connect(function(key)
  718. if key=="q" and combo==true and check==false then
  719. combo=false
  720. comboing=true
  721. for _,v in pairs(attacklist) do
  722. PrepareAttack(v)
  723. end
  724. attacklist={}
  725. comboing=false
  726. check=true
  727. wait(5)
  728. check=false
  729. end
  730. end)
  731.  
  732. mouse.KeyDown:connect(PrepareAttack)
  733.  
  734. tool.Equipped:connect(function()
  735. equipped=true
  736. lgb=script.GB:Clone()
  737. lgb.Parent=char
  738. lgb.Main.Anchored=true
  739. rgb=script.GB:Clone()
  740. rgb.Parent=char
  741. rgb.Main.Anchored=true
  742. rgbbp=Instance.new("BodyPosition")
  743. rgbbp.MaxForce=Vector3.new(math.huge,math.huge,math.huge)
  744. rgbbp.D=200
  745. rgbbp.Position = char.Torso.Position
  746. rgbbp.P=300
  747. lgbbp=Instance.new("BodyPosition")
  748. lgbbp.MaxForce=Vector3.new(math.huge,math.huge,math.huge)
  749. lgbbp.D=200
  750. lgbbp.P=300
  751. lgbbp.Position = char.Torso.Position
  752. lgbbg=Instance.new("BodyGyro")
  753. lgbbg.MaxTorque=Vector3.new(10000,10000,10000)
  754. lgbbg.D=400
  755. rgbbg=Instance.new("BodyGyro")
  756. rgbbg.MaxTorque=Vector3.new(10000,10000,10000)
  757. rgbbg.D=400
  758. headf=script.HeadFlame:Clone()
  759. headf.Parent=char
  760. headf.Anchored=false
  761. local headfw=Instance.new("Weld",headf)
  762. headfw.Part0=char.Head
  763. headfw.Part1=headf
  764. headfw.C0=CFrame.new(-0.125,0.22,-0.55)*CFrame.Angles(0,0,math.pi/2)
  765. handf=script.HandFlame:Clone()
  766. handf.Parent=char
  767. handf.Anchored=false
  768. local handfw=Instance.new("Weld",handf)
  769. handfw.Part0=char["Right Arm"]
  770. handfw.Part1=handf
  771. handfw.C0=CFrame.new(0,-1.25,0)*CFrame.Angles(0,0,-math.pi/4)
  772. rgbbp.Position = char.Torso.Position
  773. lgbbp.Position = char.Torso.Position
  774. rgbbp.Parent = rgb.Main
  775. lgbbp.Parent = lgb.Main
  776. lgbbg.Parent = lgb.Main
  777. rgbbg.Parent = rgb.Main
  778. Loop()
  779. end)
  780. tool.Unequipped:connect(function()
  781. equipped=false
  782. lgb:Destroy()
  783. rgb:Destroy()
  784. headf:Destroy()
  785. handf:Destroy()
  786. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement