View difference between Paste ID: 0z9U7sP2 and rPLeYXqj
SHOW: | | - or go back to the newest paste.
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,Mouse,mouse,UserInputService,ContextActionService = owner
4
local RealPlayer = Player
5
do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
6
7
 -- Made By NubDeveloper
8
local FlingKill = Instance.new("ScreenGui")
9
local Main = Instance.new("Frame")
10
local Label = Instance.new("Frame")
11
local Shadow = Instance.new("Frame")
12
local StartKill = Instance.new("TextButton")
13
local StopKill = Instance.new("TextButton")
14
local Instructions = Instance.new("TextLabel")
15
local CurrentPower = Instance.new("TextLabel")
16
local Recomendation = Instance.new("TextLabel")
17
local NameOfGui = Instance.new("TextLabel")
18
local Exit = Instance.new("TextButton")
19
local UPArrow = Instance.new("TextButton")
20
local DownArrow = Instance.new("TextButton")
21
22
-- Properties
23
24
FlingKill.Name = "Fling/Kill"
25
FlingKill.Parent = game.CoreGui
26
27
Main.Name = "Main"
28
Main.Parent = FlingKill
29
Main.BackgroundColor3 = Color3.new(0.92549, 0.941177, 0.945098)
30
Main.BorderSizePixel = 0
31
Main.Position = UDim2.new(0.702554762, 0, 0.446640313, 0)
32
Main.Size = UDim2.new(0, 217, 0, 233)
33
Main.Selectable = true
34
Main.Active = true
35
Main.Draggable = true
36
37
Label.Name = "Label"
38
Label.Parent = Main
39
Label.BackgroundColor3 = Color3.new(0.741176, 0.764706, 0.780392)
40
Label.BorderSizePixel = 0
41
Label.Size = UDim2.new(0, 217, 0, 27)
42
43
Shadow.Name = "Shadow"
44
Shadow.Parent = Main
45
Shadow.BackgroundColor3 = Color3.new(0.67451, 0.694118, 0.705882)
46
Shadow.BorderSizePixel = 0
47
Shadow.Position = UDim2.new(0, 0, 0.115879826, 0)
48
Shadow.Size = UDim2.new(0, 217, 0, 9)
49
50
StartKill.Name = "StartKill"
51
StartKill.Parent = Main
52
StartKill.BackgroundColor3 = Color3.new(0.741176, 0.764706, 0.780392)
53
StartKill.BorderSizePixel = 0
54
StartKill.Position = UDim2.new(0.195852548, 0, 0.227467805, 0)
55
StartKill.Size = UDim2.new(0, 126, 0, 23)
56
StartKill.Font = Enum.Font.Cartoon
57
StartKill.Text = "FE Kill/Fling"
58
StartKill.TextColor3 = Color3.new(0, 0, 0)
59
StartKill.TextSize = 14
60
61
StopKill.Name = "StopKill"
62
StopKill.Parent = Main
63
StopKill.BackgroundColor3 = Color3.new(0.741176, 0.764706, 0.780392)
64
StopKill.BorderSizePixel = 0
65
StopKill.Position = UDim2.new(0.207373276, 0, 0.38197428, 0)
66
StopKill.Size = UDim2.new(0, 124, 0, 23)
67
StopKill.Font = Enum.Font.Cartoon
68
StopKill.Text = "Stop FE Kill/Fling"
69
StopKill.TextColor3 = Color3.new(0, 0, 0)
70
StopKill.TextSize = 14
71
72
Instructions.Name = "Instructions"
73
Instructions.Parent = Main
74
Instructions.BackgroundColor3 = Color3.new(1, 1, 1)
75
Instructions.BackgroundTransparency = 1
76
Instructions.Position = UDim2.new(0.0391705073, 0, 0.549356222, 0)
77
Instructions.Size = UDim2.new(0, 200, 0, 32)
78
Instructions.Font = Enum.Font.Cartoon
79
Instructions.Text = "Just touch someone to watch the fly to their death!"
80
Instructions.TextColor3 = Color3.new(0, 0, 0)
81
Instructions.TextSize = 14
82
Instructions.TextWrapped = true
83
84
CurrentPower.Name = "CurrentPower"
85
CurrentPower.Parent = Main
86
CurrentPower.BackgroundColor3 = Color3.new(1, 1, 1)
87
CurrentPower.BackgroundTransparency = 1
88
CurrentPower.Position = UDim2.new(0.276497692, 0, 0.686695278, 0)
89
CurrentPower.Size = UDim2.new(0, 98, 0, 36)
90
CurrentPower.Font = Enum.Font.Cartoon
91
CurrentPower.Text = "Current Power = 5"
92
CurrentPower.TextColor3 = Color3.new(0, 0, 0)
93
CurrentPower.TextSize = 14
94
95
Recomendation.Name = "Recomendation"
96
Recomendation.Parent = Main
97
Recomendation.BackgroundColor3 = Color3.new(1, 1, 1)
98
Recomendation.BackgroundTransparency = 1
99
Recomendation.Position = UDim2.new(0.0414746553, 0, 0.884120166, 0)
100
Recomendation.Size = UDim2.new(0, 200, 0, 21)
101
Recomendation.Font = Enum.Font.Cartoon
102
Recomendation.Text = "Recommended Power is 5"
103
Recomendation.TextColor3 = Color3.new(0, 0, 0)
104
Recomendation.TextSize = 14
105
106
NameOfGui.Name = "NameOfGui"
107
NameOfGui.Parent = Main
108
NameOfGui.BackgroundColor3 = Color3.new(1, 1, 1)
109
NameOfGui.BackgroundTransparency = 1
110
NameOfGui.Position = UDim2.new(0.0806451589, 0, 0, 0)
111
NameOfGui.Size = UDim2.new(0, 154, 0, 27)
112
NameOfGui.Font = Enum.Font.Cartoon
113
NameOfGui.Text = "FE Kill/Fling By NubDeveloper"
114
NameOfGui.TextColor3 = Color3.new(0, 0, 0)
115
NameOfGui.TextSize = 14
116
117
Exit.Name = "Exit"
118
Exit.Parent = Main
119
Exit.BackgroundColor3 = Color3.new(1, 1, 1)
120
Exit.BackgroundTransparency = 1
121
Exit.Position = UDim2.new(0.907834113, 0, 0, 0)
122
Exit.Size = UDim2.new(0, 20, 0, 27)
123
Exit.Font = Enum.Font.Cartoon
124
Exit.Text = "X"
125
Exit.TextColor3 = Color3.new(0, 0, 0)
126
Exit.TextSize = 14
127
128
UPArrow.Name = "UPArrow"
129
UPArrow.Parent = Main
130
UPArrow.BackgroundColor3 = Color3.new(1, 1, 1)
131
UPArrow.BackgroundTransparency = 1
132
UPArrow.Position = UDim2.new(0.0783410147, 0, 0.716738224, 0)
133
UPArrow.Size = UDim2.new(0, 26, 0, 23)
134
UPArrow.Font = Enum.Font.Cartoon
135
UPArrow.Text = "Up"
136
UPArrow.TextColor3 = Color3.new(0, 0, 0)
137
UPArrow.TextSize = 12
138
UPArrow.TextWrapped = true
139
140
DownArrow.Name = "DownArrow"
141
DownArrow.Parent = Main
142
DownArrow.BackgroundColor3 = Color3.new(1, 1, 1)
143
DownArrow.BackgroundTransparency = 1
144
DownArrow.Position = UDim2.new(0.792626739, 0, 0.714592278, 0)
145
DownArrow.Size = UDim2.new(0, 26, 0, 23)
146
DownArrow.Font = Enum.Font.Cartoon
147
DownArrow.Text = "Down"
148
DownArrow.TextColor3 = Color3.new(0, 0, 0)
149
DownArrow.TextSize = 12
150
DownArrow.TextWrapped = true
151
152
power = 500
153
active = false
154
local val = Instance.new("IntValue")
155
val.Name = "Number"
156
val.Parent = game.Players.LocalPlayer
157
val.Value = 5
158
159
Exit.MouseButton1Click:connect(function()
160
FlingKill.Enabled = false
161
end)
162
163
StartKill.MouseButton1Click:connect(function()
164
game:GetService('RunService').Stepped:connect(function()
165
if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
166
game.Players.LocalPlayer.Character.Head.CanCollide = false
167
game.Players.LocalPlayer.Character.Torso.CanCollide = false
168
game.Players.LocalPlayer.Character["Left Leg"].CanCollide = false
169
game.Players.LocalPlayer.Character["Right Leg"].CanCollide = false
170
else
171
if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
172
game.Players.LocalPlayer.Character.Head.CanCollide = false
173
game.Players.LocalPlayer.Character.UpperTorso.CanCollide = false
174
game.Players.LocalPlayer.Character.LowerTorso.CanCollide = false
175
game.Players.LocalPlayer.Character.HumanoidRootPart.CanCollide = false
176
end
177
end
178
end)
179
wait(.1)
180
local bambam = Instance.new("BodyThrust")
181
bambam.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
182
bambam.Force = Vector3.new(power,0,power)
183
bambam.Location = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
184
end)
185
186
StopKill.MouseButton1Click:connect(function()
187
active = false
188
game.Players.LocalPlayer.Character.HumanoidRootPart.BodyThrust:Remove()
189
end)
190
191
UPArrow.MouseButton1Click:connect(function()
192
power = power + 100
193
game.Players.LocalPlayer.Number.Value = game.Players.LocalPlayer.Number.Value + 1
194
CurrentPower.Text = "Current Power = " .. game.Players.LocalPlayer.Number.Value
195
end)
196
197
DownArrow.MouseButton1Click:connect(function()
198
power = power - 100
199
game.Players.LocalPlayer.Number.Value = game.Players.LocalPlayer.Number.Value - 1
200
CurrentPower.Text = "Current Power = " .. game.Players.LocalPlayer.Number.Value
201
end)