View difference between Paste ID: LLRPshSb and ZEg5es1w
SHOW: | | - or go back to the newest paste.
1-
local plr = game.Players.LocalPlayer
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 print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end local plr = game.Players.LocalPlayer
6
local char = plr.Character
7
local mouse = plr:GetMouse()
8
local torso = char.Torso
9
local rs = torso["Right Shoulder"]
10
local ls = torso["Left Shoulder"]
11
local rh = torso["Right Hip"]
12
local lh = torso["Left Hip"]
13
local rj = char.HumanoidRootPart.RootJoint
14
local neck = torso.Neck
15
local animpose = "Idle"
16
local attacking = false
17
local cananim = true
18
local rage = false
19
local shield
20
local sprint = false
21
local canrage = true
22
local legs = true
23
local bc = char:WaitForChild("Body Colors")
24
local multiplier = 1
25
local lac = char["Body Colors"].LeftArmColor
26
local rac = char["Body Colors"].RightArmColor
27
local rlc = char["Body Colors"].RightArmColor
28
local llc = char["Body Colors"].LeftLegColor
29
local hc = char["Body Colors"].HeadColor
30
local tc = char["Body Colors"].TorsoColor
31
local humanoid = char:FindFirstChildOfClass("Humanoid")
32
local huge = Vector3.new(math.huge, math.huge, math.huge)
33
local mobs = Instance.new("Sound", char)
34
mobs.SoundId = "rbxassetid://245913129"
35
mobs.Looped = true
36
mobs.Volume = 3
37
humanoid.MaxHealth = math.huge
38
wait()
39
humanoid.Health = math.huge
40
humanoid.Name = "BOOM BOOM BOOOMMMM!"
41
mobs:Play()
42
if char:FindFirstChild("Animate") then
43
  char.Animate:Destroy()
44
end
45
if char:FindFirstChildOfClass("Humanoid"):FindFirstChild("Animator") then
46
  char:FindFirstChildOfClass("Humanoid").Animator:Destroy()
47
end
48
function legsonly()
49
  spawn(function()
50
    for i = 0, 10 do
51
      wait(0.001)
52
      if attacking then
53
        break
54
      end
55
    end
56
    if not attacking then
57
      legs = false
58
    end
59
  end)
60
end
61
function swait(t)
62
  if t == nil or t == 0 then
63
    game:service("RunService").Stepped:wait(0)
64
  else
65
    for i = 0, t do
66
      game:service("RunService").Stepped:wait(0)
67
    end
68
  end
69
end
70
function KICK(PLAYER)
71
  spawn(function()
72
    local function SKICK()
73
      if PLAYER.Character and PLAYER.Character:FindFirstChild("HumanoidRootPart") and PLAYER.Character:FindFirstChild("Torso") then
74
        PLAYER.Character.HumanoidRootPart.CFrame = CFrame.new(math.random(999000, 1001000), 1000000, 1000000)
75
        do
76
          local SP = Instance.new("SkateboardPlatform", PLAYER.Character)
77
          SP.Position = PLAYER.Character.HumanoidRootPart.Position
78
          SP.Transparency = 1
79
          spawn(function()
80
            repeat
81
              swait()
82
              if PLAYER.Character and PLAYER.Character:FindFirstChild("HumanoidRootPart") then
83
                SP.Position = PLAYER.Character.HumanoidRootPart.Position
84
              end
85
            until not game:GetService("Players"):FindFirstChild(PLAYER.Name)
86
          end)
87
          PLAYER.Character.Torso.Anchored = true
88
        end
89
      end
90
    end
91
    spawn(function()
92
      repeat
93
        wait()
94
        if PLAYER ~= nil then
95
          SKICK()
96
        end
97
      until not game:GetService("Players"):FindFirstChild(PLAYER.Name)
98
      if not game:GetService("Players"):FindFirstChild(PLAYER.Name) then
99
        print("REMOVED " .. PLAYER.Name)
100
      end
101
    end)
102
  end)
103
end
104
function hurt(hit, dmg)
105
  if hit.Parent then
106
    if hit.Parent:IsA("LocalScript") then
107
      print("bocks!11")
108
      hit.Parent:Destroy()
109
    end
110
    local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
111
    if hum and hum.Parent.Name ~= plr.Name then
112
      if dmg == "Kill" or hum.Health > 100000 then
113
        hit.Parent:BreakJoints()
114
        return true
115
      else
116
        if math.random(0, 100) == 50 then
117
          hum.Health = hum.Health - dmg * multiplier * 2.5
118
        else
119
          hum.Health = hum.Health - dmg * multiplier
120
        end
121
        return true
122
      end
123
    end
124
  end
125
end
126
function soundeffect(id, volume, speed, parent)
127
  spawn(function()
128
    local s = Instance.new("Sound")
129
    s.SoundId = id
130
    s.Volume = volume
131
    s.PlaybackSpeed = speed
132
    s.Parent = parent
133
    s:Play()
134
    repeat
135
      wait()
136
    until not s.Playing
137
    s:Destroy()
138
  end)
139
end
140
function gethum(obj)
141
  if obj.Parent and obj.Parent:FindFirstChild("Humanoid") and obj.Parent.Name ~= plr.Name then
142
    return obj.Parent:FindFirstChildOfClass("Humanoid")
143
  end
144
end
145
function smooth(obj)
146
  local sides = {
147
    "Left",
148
    "Right",
149
    "Top",
150
    "Bottom",
151
    "Front",
152
    "Back"
153
  }
154
  for i, v in pairs(sides) do
155
    obj[v .. "Surface"] = "SmoothNoOutlines"
156
  end
157
end
158
function fade(obj, dest, grow)
159
  spawn(function()
160
    local oldcf = obj.CFrame
161
    for i = 0, 10 do
162
      if grow then
163
        obj.Size = obj.Size + Vector3.new(1, 1, 1)
164
        obj.CFrame = oldcf
165
      end
166
      obj.Transparency = obj.Transparency + 0.1
167
      swait()
168
    end
169
    if dest then
170
      obj:Destroy()
171
    end
172
  end)
173
end
174
local keyamount = 0
175
mouse.KeyDown:connect(function(key)
176
  if key == "w" or key == "a" or key == "s" or key == "d" then
177
    keyamount = keyamount + 1
178
    if animpose ~= "Falling" then
179
      if keyamount > 3 then
180
        keyamount = 0
181
      end
182
      animpose = "Walking"
183
    end
184
  end
185
end)
186
mouse.KeyUp:connect(function(key)
187
  if key == "w" or key == "a" or key == "s" or key == "d" then
188
    keyamount = keyamount - 1
189
    if keyamount < 0 then
190
      keyamount = 0
191
    end
192
    if keyamount == 0 then
193
      animpose = "Idle"
194
    end
195
  end
196
end)
197
local gun = Instance.new("Part")
198
gun.Size = Vector3.new(3.175, 1.916, 0.465)
199
gun.CanCollide = false
200
local m = Instance.new("SpecialMesh", gun)
201
m.MeshId = "rbxassetid://468351345"
202
m.TextureId = "rbxassetid://468351348"
203
m.Scale = Vector3.new(0.1, 0.1, 0.1)
204
gun.CFrame = char.Torso.CFrame
205
gun.Parent = char
206
local gunw = Instance.new("Weld", gun)
207
gunw.Part0 = gun
208
gunw.Part1 = char["Right Arm"]
209
gunw.C0 = CFrame.new(-1.7838248, -0.410839319, 0, -0.0871557146, -0.996194541, 0, 0.996194541, -0.0871557146, 0, 0, 0, 1)
210
mouse.Button1Down:connect(function()
211
  local cf = gun.CFrame * CFrame.new(0, 0, 0.958)
212
  local mag = (gun.Position - mouse.Hit.p).magnitude
213
  local p = Instance.new("Part")
214
  p.CanCollide = false
215
  p.Anchored = false
216
  p.BrickColor = BrickColor.new("Institutional white")
217
  p.Size = Vector3.new(0.2, 0.2, mag)
218
  smooth(p)
219
  p.Material = "Neon"
220
  p.CFrame = CFrame.new(gun.Position, mouse.Hit.p) * CFrame.new(0, 0, -mag / 2)
221
  local m = Instance.new("SpecialMesh", p)
222
  m.MeshType = "Brick"
223
  p.Parent = workspace
224
  p.Touched:connect(function(hit)
225
    hurt(hit, "Kill")
226
    if hit.Size.X > 100 and 100 < hit.Size.Z and hit.Size.Y < 3 then
227
    elseif hit.Parent and hit.Parent.Name ~= plr.Name then
228
      fade(hit, true)
229
    end
230
  end)
231
  local bp = Instance.new("BodyPosition", p)
232
  bp.MaxForce = huge
233
  bp.Position = p.Position
234
  local saved = p.CFrame
235
  for i = 1, 10 do
236
    p.Size = p.Size + Vector3.new(0.01, 0.01, 0.01)
237
    p.CFrame = saved
238
    p.Velocity = Vector3.new(0, 0, 100)
239
    p.Transparency = p.Transparency + 0.1
240
    wait()
241
  end
242
  p:Destroy()
243
end)
244
mouse.KeyDown:connect(function(key)
245
  if key == "l" then
246
    function a(b)
247
      pcall(function()
248
        for i, v in pairs(b:children()) do
249
          pcall(function()
250
            if v:IsA("BasePart") and v.Parent and v.Parent.Name == "WafflesAreVeryGood" and v.Anchored then
251
              v.Anchored = false
252
            end
253
            if v:IsA("Sound") and v.Parent.Name ~= "WafflesAreVeryGood" then
254
              v:Destroy()
255
            end
256
            if v:IsA("ParticleEmitter") then
257
              v:Destroy()
258
            end
259
            a(v)
260
          end)
261
        end
262
      end)
263
    end
264
    a(game)
265
  end
266
  if key == "q" then
267
    local cf = gun.CFrame * CFrame.new(0, 0, 0.958)
268
    local mag = (gun.Position - mouse.Hit.p).magnitude
269
    local p = Instance.new("Part")
270
    p.CanCollide = false
271
    p.Anchored = false
272
    p.BrickColor = BrickColor.new("Really red")
273
    p.Size = Vector3.new(0.2, 0.2, mag)
274
    smooth(p)
275
    p.Material = "Neon"
276
    p.CFrame = CFrame.new(gun.Position, mouse.Hit.p) * CFrame.new(0, 0, -mag / 2)
277
    local m = Instance.new("SpecialMesh", p)
278
    m.MeshType = "Brick"
279
    p.Parent = workspace
280
    p.Touched:connect(function(hit)
281
      if gethum(hit) then
282
        for i, v in pairs(hit.Parent:children()) do
283
          if v:IsA("Model") then
284
            v:BreakJoints()
285
          end
286
          local ok = false
287
          for i, e in pairs({
288
            "Right Arm",
289
            "Left Arm",
290
            "Right Leg",
291
            "Left Leg",
292
            "Head",
293
            "Torso",
294
            "HumanoidRootPart"
295
          }) do
296
            if v.Name == e then
297
              ok = true
298
            end
299
          end
300
          if v:IsA("BasePart") and not ok then
301
            fade(v, true)
302
          end
303
        end
304
      end
305
      if hit:FindFirstChildOfClass("TouchTransmitter") then
306
        hit:FindFirstChildOfClass("TouchTransmitter"):Destroy()
307
      end
308
    end)
309
    local bp = Instance.new("BodyPosition", p)
310
    bp.MaxForce = huge
311
    bp.Position = p.Position
312
    local saved = p.CFrame
313
    for i = 1, 10 do
314
      p.Size = p.Size + Vector3.new(0.01, 0.01, 0.01)
315
      p.CFrame = saved
316
      p.Velocity = Vector3.new(0, 0, 100)
317
      p.Transparency = p.Transparency + 0.1
318
      wait()
319
    end
320
    p:Destroy()
321
  end
322
  if key == "e" then
323
    local cf = gun.CFrame * CFrame.new(0, 0, 0.958)
324
    local mag = (gun.Position - mouse.Hit.p).magnitude
325
    local p = Instance.new("Part")
326
    p.CanCollide = false
327
    p.Anchored = false
328
    p.BrickColor = BrickColor.new("New Yeller")
329
    p.Size = Vector3.new(0.2, 0.2, mag)
330
    smooth(p)
331
    p.Material = "Neon"
332
    p.CFrame = CFrame.new(gun.Position, mouse.Hit.p) * CFrame.new(0, 0, -mag / 2)
333
    local m = Instance.new("SpecialMesh", p)
334
    m.MeshType = "Brick"
335
    p.Parent = workspace
336
    p.Touched:connect(function(hit)
337
      if gethum(hit) then
338
        local target = game.Players:FindFirstChild(hit.Parent.Name)
339
        if target then
340
          KICK(target)
341
        end
342
      end
343
    end)
344
    local bp = Instance.new("BodyPosition", p)
345
    bp.MaxForce = huge
346
    bp.Position = p.Position
347
    local saved = p.CFrame
348
    for i = 1, 10 do
349
      p.Size = p.Size + Vector3.new(0.01, 0.01, 0.01)
350
      p.CFrame = saved
351
      p.Velocity = Vector3.new(0, 0, 100)
352
      p.Transparency = p.Transparency + 0.1
353
      wait()
354
    end
355
    p:Destroy()
356
  end
357
  if key == "r" then
358
    local cf = gun.CFrame * CFrame.new(0, 0, 0.958)
359
    local mag = (gun.Position - mouse.Hit.p).magnitude
360
    local p = Instance.new("Part")
361
    p.CanCollide = false
362
    p.Anchored = false
363
    p.BrickColor = BrickColor.new("Lime green")
364
    p.Size = Vector3.new(0.2, 0.2, mag)
365
    smooth(p)
366
    p.Material = "Neon"
367
    p.CFrame = CFrame.new(gun.Position, mouse.Hit.p) * CFrame.new(0, 0, -mag / 2)
368
    local m = Instance.new("SpecialMesh", p)
369
    m.MeshType = "Brick"
370
    p.Parent = workspace
371
    p.Touched:connect(function(hit)
372
      local hum = gethum(hit)
373
      if hum then
374
        hum.Health = hum.MaxHealth
375
      end
376
    end)
377
    local bp = Instance.new("BodyPosition", p)
378
    bp.MaxForce = huge
379
    bp.Position = p.Position
380
    local saved = p.CFrame
381
    for i = 1, 10 do
382
      p.Size = p.Size + Vector3.new(0.01, 0.01, 0.01)
383
      p.CFrame = saved
384
      p.Velocity = Vector3.new(0, 0, 100)
385
      p.Transparency = p.Transparency + 0.1
386
      wait()
387
    end
388
    p:Destroy()
389
  end
390
end)
391
game:GetService("RunService").Stepped:connect(function()
392
  local x, z
393
  local dir = CFrame.new(char.HumanoidRootPart.Position, mouse.Hit.p).lookVector
394
  x = dir.X
395
  z = dir.Z
396
  local cf = CFrame.new(char.HumanoidRootPart.Position, char.HumanoidRootPart.Position + Vector3.new(x, 0, z))
397
  char.HumanoidRootPart.CFrame = char.HumanoidRootPart.CFrame:Lerp(cf, 0.5)
398
  humanoid.AutoRotate = false
399
end)
400
while wait() do
401
  if animpose == "Walking" and cananim and legs then
402
    for i = 0, 0.7, 0.1 do
403
      if animpose == "Walking" and cananim and legs then
404
        ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.104528472, -0.994522035, 0, 0.994522035, 0.104528472, 1, 0, 0), 0.2)
405
        rs.C0 = rs.C0:Lerp(CFrame.new(1.54167628, 0.0454798974, 0, -0.482965499, -0.871292651, -0.087155737, -0.0422539636, -0.0762281716, 0.996195912, -0.874620378, 0.484809875, 0), 0.2)
406
        neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -0.500000656, -0.866026223, 0, -1.61309954E-9, 9.31323796E-10, 1.00000024, -0.866026342, 0.500000715, -1.86264515E-9), 0.2)
407
        rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.469472021, 0.882948279, 0, 0, 0, 1, 0.882948279, 0.469472021, 0), 0.2)
408
        lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -0.0219629817, 0.02712203, -0.999390841, -0.628937364, 0.776673257, 0.0348994955, 0.777146697, 0.6293208, 0), 0.4)
409
        rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, 0.0238014236, -0.0255239103, 0.999390841, -0.681583524, 0.73090899, 0.0348994955, -0.731354535, -0.681998909, 0), 0.4)
410
        wait()
411
      else
412
        break
413
      end
414
    end
415
    for i = 0, 0.7, 0.1 do
416
      if animpose == "Walking" and cananim and legs then
417
        ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.104528472, -0.994522035, 0, 0.994522035, 0.104528472, 1, 0, 0), 0.2)
418
        rs.C0 = rs.C0:Lerp(CFrame.new(1.54167628, 0.0454798974, 0, -0.482965499, -0.871292651, -0.087155737, -0.0422539636, -0.0762281716, 0.996195912, -0.874620378, 0.484809875, 0), 0.2)
419
        neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -0.500000656, -0.866026223, 0, -1.61309954E-9, 9.31323796E-10, 1.00000024, -0.866026342, 0.500000715, -1.86264515E-9), 0.2)
420
        rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.469472021, 0.882948279, 0, 0, 0, 1, 0.882948279, 0.469472021, 0), 0.2)
421
        lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, 0.0205134545, 0.0282343514, -0.999390841, 0.587428331, 0.808525503, 0.0348994955, 0.809018135, -0.587786257, 0), 0.4)
422
        rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -0.0224330258, -0.0267346334, 0.999390841, 0.642397523, 0.765579402, 0.0348994955, -0.76604569, 0.642788768, 0), 0.4)
423
        wait()
424
      else
425
        break
426
      end
427
    end
428
  end
429
  if animpose == "Idle" and cananim and legs then
430
    ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.104528472, -0.994522035, 0, 0.994522035, 0.104528472, 1, 0, 0), 0.2)
431
    rs.C0 = rs.C0:Lerp(CFrame.new(1.54167628, 0.0454798974, 0, -0.482965499, -0.871292651, -0.087155737, -0.0422539636, -0.0762281716, 0.996195912, -0.874620378, 0.484809875, 0), 0.2)
432
    neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -0.500000656, -0.866026223, 0, -1.61309954E-9, 9.31323796E-10, 1.00000024, -0.866026342, 0.500000715, -1.86264515E-9), 0.2)
433
    rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.469472021, 0.882948279, 0, 0, 0, 1, 0.882948279, 0.469472021, 0), 0.2)
434
    lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, 0, 0.0523359552, -0.99862957, 0, 0.99862957, 0.0523359552, 1, 0, 0), 0.5)
435
    rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, 0, -0.0523359627, 0.998629689, 0, 0.998629689, 0.0523359627, -1, 0, 0), 0.5)
436
  end
437
end