Advertisement
Mitko1223tm

g blast fe

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