SHOW:
|
|
- or go back to the newest paste.
1 | - | me = game.Players.buttmyhead |
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 me = game.Players.timetodie23232223 | |
6 | if script.Parent.className ~= "HopperBin" then | |
7 | h = Instance.new("HopperBin",me.Backpack) | |
8 | h.Name = "LAZOR" | |
9 | script.Parent = h | |
10 | end | |
11 | bin = script.Parent | |
12 | function prop(part, parent, collide, tran, ref, x, y, z, color) | |
13 | part.Parent = parent | |
14 | part.formFactor = 0 | |
15 | part.CanCollide = collide | |
16 | part.Transparency = tran | |
17 | part.Reflectance = ref | |
18 | part.Size = Vector3.new(x,y,z) | |
19 | part.BrickColor = BrickColor.new(color) | |
20 | part.TopSurface = 0 | |
21 | part.BottomSurface = 0 | |
22 | part:BreakJoints() | |
23 | end | |
24 | function weld(w, p, p0, p1, a, b, c, x, y, z) | |
25 | w.Parent = p | |
26 | w.Part0 = p0 | |
27 | w.Part1 = p1 | |
28 | w.C1 = CFrame.fromEulerAnglesXYZ(a,b,c) * CFrame.new(x,y,z) | |
29 | end | |
30 | function mesh(mesh, parent, x, y, z, type) | |
31 | mesh.Parent = parent | |
32 | mesh.Scale = Vector3.new(x, y, z) | |
33 | mesh.MeshType = type | |
34 | end | |
35 | using = false | |
36 | sound = Instance.new("Sound",me.Character.Head) | |
37 | sound.Volume = 0.6 | |
38 | sound.Pitch = 1 | |
39 | sound.SoundId = "rbxasset://sounds/uuhhh.wav" | |
40 | bin.Selected:connect(function(mouse) | |
41 | mouse.Button1Down:connect(function() | |
42 | if using then return end | |
43 | using = true | |
44 | local blagh = Instance.new("Model",me.Character) | |
45 | blagh.Name = "LAZOR" | |
46 | local paw = mouse.Hit.p | |
47 | local pa1 = Instance.new("Part") | |
48 | prop(pa1,blagh,false,0,0,1,1,1,"Really black") | |
49 | local m1 = Instance.new("SpecialMesh") | |
50 | mesh(m1, pa1, 1.07,1,0.3,"Brick") | |
51 | local w1 = Instance.new("Weld") | |
52 | weld(w1, me.Character.Head, me.Character.Head, pa1, 0.4, 0, 0, 0, -0.4, 0.9) | |
53 | local pa2 = pa1:clone() | |
54 | prop(pa2,blagh,false,0,0,1,1,1,"Really black") | |
55 | local w2 = Instance.new("Weld") | |
56 | weld(w2, me.Character.Head, me.Character.Head, pa2, -0.4, 0, 0, 0, 0.4, 0.9) | |
57 | local pa3 = Instance.new("Part") | |
58 | prop(pa3,blagh,false,0,0,1,1,1,"Really red") | |
59 | local m3 = Instance.new("SpecialMesh") | |
60 | mesh(m3,pa3,1.3,1.23,0.29,"Brick") | |
61 | local w3 = Instance.new("Weld") | |
62 | weld(w3, me.Character.Head, me.Character.Head, pa3, 0.4, 0, 0, 0, -0.4, 0.9) | |
63 | local pa4 = pa3:clone() | |
64 | prop(pa4,blagh,false,0,0,1,1,1,"Really red") | |
65 | local w4 = Instance.new("Weld") | |
66 | weld(w4, me.Character.Head, me.Character.Head, pa4, -0.4, 0, 0, 0, 0.4, 0.9) | |
67 | local eye1a = Instance.new("Part") | |
68 | prop(eye1a,blagh,false,0,0,1,1,1,"Institutional white") | |
69 | eye1a.Shape = "Ball" | |
70 | local emesh1 = Instance.new("SpecialMesh") | |
71 | mesh(emesh1,eye1a,0.75,0.75,0.75,"Sphere") | |
72 | local ew = Instance.new("Weld") | |
73 | weld(ew, me.Character.Head, me.Character.Head, eye1a, 0, 0, 0, 0.45, -1.3, 1.1) | |
74 | local eye1b = Instance.new("Part") | |
75 | prop(eye1b,blagh,false,0,0,1,1,1,"Really black") | |
76 | eye1b.Shape = "Ball" | |
77 | local emesh1b = Instance.new("SpecialMesh") | |
78 | mesh(emesh1b,eye1b,0.4,0.4,0.4,"Sphere") | |
79 | local ew2 = Instance.new("Weld") | |
80 | weld(ew2, eye1a, eye1a, eye1b, 0, 0, 0, 0.09, -0.04, 0.2) | |
81 | local eye2a = eye1a:clone() | |
82 | prop(eye2a,blagh,false,0,0,1,1,1,"Institutional white") | |
83 | local ew3 = Instance.new("Weld") | |
84 | weld(ew3, me.Character.Head, me.Character.Head, eye2a, 0, 0, 0, -0.45, -1.3, 1.1) | |
85 | local eye2b = eye1b:clone() | |
86 | prop(eye2b,blagh,false,0,0,1,1,1,"Really black") | |
87 | local ew5 = Instance.new("Weld") | |
88 | weld(ew5, eye2a, eye2a, eye2b, 0, 0, 0, -0.05, 0.07, 0.2) | |
89 | local bill = Instance.new("BillboardGui",pa1) | |
90 | bill.Adornee = bill.Parent | |
91 | bill.Size = UDim2.new(0,150,0,80) | |
92 | local txt = Instance.new("TextLabel",bill) | |
93 | txt.Size = UDim2.new(0,0,0,0) | |
94 | txt.Position = UDim2.new(0,100,0,-20) | |
95 | txt.Text = "IMA FIRIN' MAH LAZORR!!" | |
96 | txt.FontSize = "Size24" | |
97 | txt.TextColor3 = Color3.new(0,0,0) | |
98 | sound.Volume = 0.6 | |
99 | for i=1, 5 do | |
100 | sound.Pitch = math.random(400,900)/1000 | |
101 | sound:play() | |
102 | wait(0.1) | |
103 | end | |
104 | local bg = Instance.new("BodyGyro",me.Character.Torso) | |
105 | bg.maxTorque = Vector3.new(math.huge,math.huge,math.huge) | |
106 | bg.cframe = CFrame.new(me.Character.Torso.Position, paw) | |
107 | for i=1, 5 do | |
108 | sound.Pitch = math.random(400,900)/1000 | |
109 | sound:play() | |
110 | wait(0.2) | |
111 | end | |
112 | txt.Text = "BLAARGHH!!!!!!" | |
113 | sound.Volume = 0.85 | |
114 | for i=1, 60 do | |
115 | local dist = (me.Character.Head.Position - paw).magnitude | |
116 | if dist >= 600 then | |
117 | dist = 600 | |
118 | end | |
119 | bg.cframe = CFrame.new(me.Character.Torso.Position, paw) | |
120 | sound.Pitch = math.random(550,750)/1000 | |
121 | sound:play() | |
122 | local bewm = Instance.new("Part") | |
123 | prop(bewm, blagh, false, 0.4, 0.25, 1, 1, dist, "Cyan") | |
124 | bewm.Anchored = true | |
125 | local mes = Instance.new("SpecialMesh") | |
126 | mesh(mes,bewm,1.2,1.2,1,"Brick") | |
127 | bewm.CFrame = CFrame.new(me.Character.Head.Position, paw) * CFrame.new(0,0,-bewm.Size.Z/2) * CFrame.new(0,0,-1) | |
128 | local luck = math.random(1,3) | |
129 | if luck == 1 then | |
130 | local cfr = Instance.new("Part",blagh) | |
131 | cfr.Size = Vector3.new(1,1,1) | |
132 | cfr.Transparency = 1 | |
133 | cfr.Anchored = true | |
134 | cfr.CFrame = bewm.CFrame * CFrame.new(0,0,-bewm.Size.Z/2) | |
135 | local ex = Instance.new("Explosion") | |
136 | ex.Parent = blagh | |
137 | ex.Position = cfr.Position | |
138 | ex.BlastRadius = 99999999999999999999 | |
139 | ex.BlastPressure = 4000000000 | |
140 | ex.Hit:connect(function(part) | |
141 | if part:GetMass() < 240 then | |
142 | part.Anchored = false | |
143 | part:BreakJoints() | |
144 | end | |
145 | end) | |
146 | end | |
147 | wait() | |
148 | bewm:remove() | |
149 | end | |
150 | blagh:remove() | |
151 | bg:remove() | |
152 | using = false | |
153 | end) | |
154 | end) |