carlosname

Untitled

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