Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by iPxter
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").Rohan_Kishiba
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- --Windows95/FR34KY @V3rm
- local player=game:GetService("Players").Rohan_Kishiba;
- local char=game:GetService("Players").Rohan_Kishiba.Character;
- local humanoid = player.Character.Humanoid;
- Tool=Instance.new('Tool', game.Players.Rohan_Kishiba.Backpack);
- Tool.GripForward=Vector3.new(-0.161, 0, -0.987);
- Tool.GripPos=Vector3.new(0.1, 0, 0.1);
- Tool.GripRight=Vector3.new(0.217, 0, -0.976);
- Tool.GripUp=Vector3.new(0, 1, 0);
- Tool.Name='Smoke Grenade'
- Handle=Instance.new('Part', Tool);
- Handle.Name = 'Handle';
- Handle.Size=Vector3.new(1, 1.2, 1);
- c4mesh=Instance.new('SpecialMesh', Handle);
- c4mesh.MeshType = 'FileMesh';
- c4mesh.MeshId='http://www.roblox.com/asset/?id=16975131';
- c4mesh.TextureId='http://www.roblox.com/asset/?id=16975111';
- c4mesh.Scale=Vector3.new(0.75, 0.75, 0.75);
- light=Instance.new('PointLight', Handle);
- light.Color = Color3.new(255,0,0)
- light.Range=10;
- light.Enabled=false;
- beep=Instance.new('Sound',Handle)
- beep.Volume=5;
- beep.SoundId='rbxassetid://252141949'
- access=Instance.new('Sound',Handle)
- access.Volume=5;
- access.SoundId='rbxassetid://131644923'
- beeptone=Instance.new('Sound',Handle)
- beeptone.Volume=5;
- beeptone.SoundId='rbxassetid://75338648'
- local Prepare=Instance.new("Animation");
- Prepare.AnimationId="http://www.roblox.com/Asset?ID=75322014";
- local Launch=Instance.new("Animation");
- Launch.AnimationId="http://www.roblox.com/Asset?ID=94157627";
- function onActivated()
- if not Tool.Enabled then
- return
- end
- Tool.Enabled=false;
- local LaunchAnim = humanoid:LoadAnimation(Launch);
- LaunchAnim:Play();
- wait(0.4)
- local p = Handle:Clone();
- local dir = char.Head.CFrame.lookVector;
- p.Velocity = (dir * 80) + Vector3.new(0,8,0);
- p.CanCollide = true;
- p.Parent = game.Workspace;
- p.Name='c4';
- beep.Parent=p;
- light.Parent=p;
- Handle.Transparency=1;
- wait(0.2)
- smokee=Instance.new('ParticleEmitter', p)
- smokee.Size = NumberSequence.new(31)
- smokee.Speed = NumberRange.new(10)
- smokee.RotSpeed = NumberRange.new(-255, 250)
- smokee.Texture = 'http://www.roblox.com/asset/?id=241539438'
- smokee.LightEmission = 1
- ex=Instance.new('Explosion',workspace);
- ex.BlastPressure=6;
- ex.BlastRadius=6;
- ex.Position=p.Position;
- smokee.VelocitySpread = 30
- smokee.Rate = 500
- smokee.Enabled=true;
- ss=Instance.new('Sound',p);
- ss.Volume=5;
- ss.SoundId='rbxassetid://424618966';
- ss:Play();
- Handle.Transparency=1;
- wait(16)
- p:remove();
- Handle.Transparency=0
- Tool.Enabled=true;
- end
- Tool.Activated:connect(onActivated);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement