Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,game,owner = owner,game
- local RealPlayer = Player
- do
- print("FE Compatibility code by Mokiros, Edited by StarzoZero")
- local rp = RealPlayer
- script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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(),Button2Up=fakeEvent(),Button2Down=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 then
- for _,f in pairs(t.Functions) do
- f(...)
- end
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=rp then return end
- m.Target = io.Target
- m.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return m:TrigEvent(b and "Button2Down" or "Button2Up")
- 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").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local Mouse = Player:GetMouse()
- 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,Hit=Mouse.Hit,Target=Mouse.Target})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- 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)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local _rg = game
- --Metatable for fake service
- local fsmt = {
- __index = function(self,k)
- local s = rawget(self,"_RealService")
- if s then
- return typeof(s[k])=="function"
- and function(_,...)return s[k](s,...)end or s[k]
- end
- end,
- __newindex = function(self,k,v)
- local s = rawget(self,"_RealService")
- if s then s[k]=v end
- end
- }
- local function FakeService(t,RealService)
- t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
- return setmetatable(t,fsmt)
- end
- --Fake game object
- local g = {
- GetService = function(self,s)
- return rawget(self,s) or _rg:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = _rg:GetService("RunService").Heartbeat,
- BindToRenderStep = function(self,name,_,fun)
- self._btrs[name] = self.Heartbeat:Connect(fun)
- end,
- UnbindFromRenderStep = function(self,name)
- self._btrs[name]:Disconnect()
- end,
- },"RunService")
- }
- rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
- g.service = g.GetService
- FakeService(g,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = g,g.Players.LocalPlayer
- end
- -- Made By JackMcJagger15
- local FlingKill = Instance.new("ScreenGui")
- local Main = Instance.new("Frame")
- local Label = Instance.new("Frame")
- local Shadow = Instance.new("Frame")
- local StartKill = Instance.new("TextButton")
- local StopKill = Instance.new("TextButton")
- local Instructions = Instance.new("TextLabel")
- local CurrentPower = Instance.new("TextLabel")
- local Recomendation = Instance.new("TextLabel")
- local NameOfGui = Instance.new("TextLabel")
- local Exit = Instance.new("TextButton")
- local UPArrow = Instance.new("TextButton")
- local DownArrow = Instance.new("TextButton")
- -- Properties
- FlingKill.Name = "Fling/Kill"
- FlingKill.Parent = game.CoreGui
- Main.Name = "Main"
- Main.Parent = FlingKill
- Main.BackgroundColor3 = Color3.new(0.92549, 0.941177, 0.945098)
- Main.BorderSizePixel = 0
- Main.Position = UDim2.new(0.702554762, 0, 0.446640313, 0)
- Main.Size = UDim2.new(0, 217, 0, 233)
- Main.Selectable = true
- Main.Active = true
- Main.Draggable = true
- Label.Name = "Label"
- Label.Parent = Main
- Label.BackgroundColor3 = Color3.new(0.741176, 0.764706, 0.780392)
- Label.BorderSizePixel = 0
- Label.Size = UDim2.new(0, 217, 0, 27)
- Shadow.Name = "Shadow"
- Shadow.Parent = Main
- Shadow.BackgroundColor3 = Color3.new(0.67451, 0.694118, 0.705882)
- Shadow.BorderSizePixel = 0
- Shadow.Position = UDim2.new(0, 0, 0.115879826, 0)
- Shadow.Size = UDim2.new(0, 217, 0, 9)
- StartKill.Name = "StartKill"
- StartKill.Parent = Main
- StartKill.BackgroundColor3 = Color3.new(0.741176, 0.764706, 0.780392)
- StartKill.BorderSizePixel = 0
- StartKill.Position = UDim2.new(0.195852548, 0, 0.227467805, 0)
- StartKill.Size = UDim2.new(0, 126, 0, 23)
- StartKill.Font = Enum.Font.Cartoon
- StartKill.Text = "FE Kill/Fling"
- StartKill.TextColor3 = Color3.new(0, 0, 0)
- StartKill.TextSize = 14
- StopKill.Name = "StopKill"
- StopKill.Parent = Main
- StopKill.BackgroundColor3 = Color3.new(0.741176, 0.764706, 0.780392)
- StopKill.BorderSizePixel = 0
- StopKill.Position = UDim2.new(0.207373276, 0, 0.38197428, 0)
- StopKill.Size = UDim2.new(0, 124, 0, 23)
- StopKill.Font = Enum.Font.Cartoon
- StopKill.Text = "Stop FE Kill/Fling"
- StopKill.TextColor3 = Color3.new(0, 0, 0)
- StopKill.TextSize = 14
- Instructions.Name = "Instructions"
- Instructions.Parent = Main
- Instructions.BackgroundColor3 = Color3.new(1, 1, 1)
- Instructions.BackgroundTransparency = 1
- Instructions.Position = UDim2.new(0.0391705073, 0, 0.549356222, 0)
- Instructions.Size = UDim2.new(0, 200, 0, 32)
- Instructions.Font = Enum.Font.Cartoon
- Instructions.Text = "Just touch someone to watch the fly to their death!"
- Instructions.TextColor3 = Color3.new(0, 0, 0)
- Instructions.TextSize = 14
- Instructions.TextWrapped = true
- CurrentPower.Name = "CurrentPower"
- CurrentPower.Parent = Main
- CurrentPower.BackgroundColor3 = Color3.new(1, 1, 1)
- CurrentPower.BackgroundTransparency = 1
- CurrentPower.Position = UDim2.new(0.276497692, 0, 0.686695278, 0)
- CurrentPower.Size = UDim2.new(0, 98, 0, 36)
- CurrentPower.Font = Enum.Font.Cartoon
- CurrentPower.Text = "Current Power = 5"
- CurrentPower.TextColor3 = Color3.new(0, 0, 0)
- CurrentPower.TextSize = 14
- Recomendation.Name = "Recomendation"
- Recomendation.Parent = Main
- Recomendation.BackgroundColor3 = Color3.new(1, 1, 1)
- Recomendation.BackgroundTransparency = 1
- Recomendation.Position = UDim2.new(0.0414746553, 0, 0.884120166, 0)
- Recomendation.Size = UDim2.new(0, 200, 0, 21)
- Recomendation.Font = Enum.Font.Cartoon
- Recomendation.Text = "Recommended Power is 5"
- Recomendation.TextColor3 = Color3.new(0, 0, 0)
- Recomendation.TextSize = 14
- NameOfGui.Name = "NameOfGui"
- NameOfGui.Parent = Main
- NameOfGui.BackgroundColor3 = Color3.new(1, 1, 1)
- NameOfGui.BackgroundTransparency = 1
- NameOfGui.Position = UDim2.new(0.0806451589, 0, 0, 0)
- NameOfGui.Size = UDim2.new(0, 154, 0, 27)
- NameOfGui.Font = Enum.Font.Cartoon
- NameOfGui.Text = "FE Kill/Fling By JackMcJagger15"
- NameOfGui.TextColor3 = Color3.new(0, 0, 0)
- NameOfGui.TextSize = 14
- Exit.Name = "Exit"
- Exit.Parent = Main
- Exit.BackgroundColor3 = Color3.new(1, 1, 1)
- Exit.BackgroundTransparency = 1
- Exit.Position = UDim2.new(0.907834113, 0, 0, 0)
- Exit.Size = UDim2.new(0, 20, 0, 27)
- Exit.Font = Enum.Font.Cartoon
- Exit.Text = "X"
- Exit.TextColor3 = Color3.new(0, 0, 0)
- Exit.TextSize = 14
- UPArrow.Name = "UPArrow"
- UPArrow.Parent = Main
- UPArrow.BackgroundColor3 = Color3.new(1, 1, 1)
- UPArrow.BackgroundTransparency = 1
- UPArrow.Position = UDim2.new(0.0783410147, 0, 0.716738224, 0)
- UPArrow.Size = UDim2.new(0, 26, 0, 23)
- UPArrow.Font = Enum.Font.Cartoon
- UPArrow.Text = "Up"
- UPArrow.TextColor3 = Color3.new(0, 0, 0)
- UPArrow.TextSize = 12
- UPArrow.TextWrapped = true
- DownArrow.Name = "DownArrow"
- DownArrow.Parent = Main
- DownArrow.BackgroundColor3 = Color3.new(1, 1, 1)
- DownArrow.BackgroundTransparency = 1
- DownArrow.Position = UDim2.new(0.792626739, 0, 0.714592278, 0)
- DownArrow.Size = UDim2.new(0, 26, 0, 23)
- DownArrow.Font = Enum.Font.Cartoon
- DownArrow.Text = "Down"
- DownArrow.TextColor3 = Color3.new(0, 0, 0)
- DownArrow.TextSize = 12
- DownArrow.TextWrapped = true
- power = 500
- active = false
- local val = Instance.new("IntValue")
- val.Name = "Number"
- val.Parent = game.Players.LocalPlayer
- val.Value = 5
- Exit.MouseButton1Click:connect(function()
- FlingKill.Enabled = false
- end)
- StartKill.MouseButton1Click:connect(function()
- game:GetService('RunService').Stepped:connect(function()
- if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
- game.Players.LocalPlayer.Character.Head.CanCollide = false
- game.Players.LocalPlayer.Character.Torso.CanCollide = false
- game.Players.LocalPlayer.Character["Left Leg"].CanCollide = false
- game.Players.LocalPlayer.Character["Right Leg"].CanCollide = false
- else
- if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
- game.Players.LocalPlayer.Character.Head.CanCollide = false
- game.Players.LocalPlayer.Character.UpperTorso.CanCollide = false
- game.Players.LocalPlayer.Character.LowerTorso.CanCollide = false
- game.Players.LocalPlayer.Character.HumanoidRootPart.CanCollide = false
- end
- end
- end)
- wait(.1)
- local bambam = Instance.new("BodyThrust")
- bambam.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
- bambam.Force = Vector3.new(power,0,power)
- bambam.Location = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
- end)
- StopKill.MouseButton1Click:connect(function()
- active = false
- game.Players.LocalPlayer.Character.HumanoidRootPart.BodyThrust:Remove()
- end)
- UPArrow.MouseButton1Click:connect(function()
- power = power + 100
- game.Players.LocalPlayer.Number.Value = game.Players.LocalPlayer.Number.Value + 1
- CurrentPower.Text = "Current Power = " .. game.Players.LocalPlayer.Number.Value
- end)
- DownArrow.MouseButton1Click:connect(function()
- power = power - 100
- game.Players.LocalPlayer.Number.Value = game.Players.LocalPlayer.Number.Value - 1
- CurrentPower.Text = "Current Power = " .. game.Players.LocalPlayer.Number.Value
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement