View difference between Paste ID: ndBVCFwQ and 7KYJMuR0
SHOW: | | - or go back to the newest paste.
1-
--Windows95/FR34KY @V3rm
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 --Windows95/FR34KY @V3rm
6
local player=game.Players.LocalPlayer;
7
local char=game.Players.LocalPlayer.Character;
8
local humanoid = player.Character.Humanoid;
9
Tool=Instance.new('Tool', game.Players.LocalPlayer.Backpack);
10
Tool.GripForward=Vector3.new(-0.161, 0, -0.987);
11
Tool.GripPos=Vector3.new(0.1, 0, 0.1);
12
Tool.GripRight=Vector3.new(0.217, 0, -0.976);
13
Tool.GripUp=Vector3.new(0, 1, 0);
14
Tool.Name='Smoke Grenade'
15
Handle=Instance.new('Part', Tool);
16
Handle.Name = 'Handle';
17
Handle.Size=Vector3.new(1, 1.2, 1);
18
c4mesh=Instance.new('SpecialMesh', Handle);
19
c4mesh.MeshType = 'FileMesh';
20
c4mesh.MeshId='http://www.roblox.com/asset/?id=1827757903';
21
c4mesh.TextureId='http://www.roblox.com/asset/?id=1827757925';
22
c4mesh.Scale=Vector3.new(0.75, 0.75, 0.75);
23
light=Instance.new('PointLight', Handle);
24
light.Color = Color3.new(255,0,0)
25
light.Range=10;
26
light.Enabled=false;
27
beep=Instance.new('Sound',Handle)
28
beep.Volume=5;
29
beep.SoundId='rbxassetid://912540712'
30
access=Instance.new('Sound',Handle)
31
access.Volume=5;
32
access.SoundId='rbxassetid://912540712'
33
beeptone=Instance.new('Sound',Handle)
34
beeptone.Volume=5;
35
beeptone.SoundId='rbxassetid://75338648'
36
local Prepare=Instance.new("Animation");
37
Prepare.AnimationId="http://www.roblox.com/Asset?ID=75322014";
38
local Launch=Instance.new("Animation");
39
Launch.AnimationId="http://www.roblox.com/Asset?ID=94157627";
40
function onActivated()
41
	if not Tool.Enabled  then
42
		return
43
	end
44
	Tool.Enabled=false;
45
local LaunchAnim = humanoid:LoadAnimation(Launch);
46
LaunchAnim:Play();
47
wait(0.4)
48
49
	local p = Handle:Clone();
50
	local dir = char.Head.CFrame.lookVector;
51
	p.Velocity = (dir * 80) + Vector3.new(0,8,0);
52
	p.CanCollide = true;
53
	p.Parent = game.Workspace;
54
	p.Name='c4';
55
	beep.Parent=p;
56
	light.Parent=p;
57
	Handle.Transparency=1;
58
59
wait(0.2)
60
smokee=Instance.new('ParticleEmitter', p)
61
smokee.Size = NumberSequence.new(31)
62
smokee.Speed = NumberRange.new(10)
63
smokee.RotSpeed = NumberRange.new(-255, 250)
64
smokee.Texture = 'http://www.roblox.com/asset/?id=288392896'
65
smokee.LightEmission = 1
66
ex=Instance.new('Explosion',workspace);
67
ex.BlastPressure=5;
68
ex.BlastRadius=5;
69
ex.Position=p.Position;
70
smokee.VelocitySpread = 30
71
smokee.Rate = 500
72
smokee.Enabled=true;
73
ss=Instance.new('Sound',p);
74
ss.Volume=5;
75
ss.SoundId='rbxassetid://912540712';
76
ss:Play();
77
Handle.Transparency=1;
78
wait(16)
79
p:remove();
80
Handle.Transparency=0
81
Tool.Enabled=true;
82
83
84
85
end
86
Tool.Activated:connect(onActivated);