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