SHOW:
|
|
- or go back to the newest paste.
1 | - | --[[ |
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 | Controls: | |
7 | LCTRL: Fire a friendliness pellet | |
8 | K: Evil laugh | |
9 | Z: Angry flowy | |
10 | J: Spooky flowy theme | |
11 | G: Normal flowy theme | |
12 | F: Stop music | |
13 | X: Remove dialogue box | |
14 | ||
15 | ]]-- | |
16 | dot = false | |
17 | shoot = true | |
18 | des = false | |
19 | local ChatService = game:GetService("Chat") | |
20 | for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do | |
21 | if v:IsA('Part') then v.Transparency = 1 | |
22 | if v:IsA('Hat') then v.Handle.Transparency = 1 | |
23 | ||
24 | end | |
25 | end | |
26 | end | |
27 | local player = game.Players.LocalPlayer | |
28 | player.Character.Head.face:Remove() | |
29 | ||
30 | m=player:GetMouse() | |
31 | bb = Instance.new("BillboardGui",player.Character.Head) | |
32 | bb.Enabled = true | |
33 | bb.AlwaysOnTop = true | |
34 | ||
35 | bb.Size = UDim2.new(0,200,0,50) | |
36 | bb.StudsOffset = Vector3.new(-0.5,-0.5,0) | |
37 | fl = Instance.new("Part",player.Character) | |
38 | ||
39 | fl.FormFactor = 3 | |
40 | fl.Size = Vector3.new(3,3,0.01) | |
41 | fl.Transparency = 1 | |
42 | aa = 0.075 | |
43 | fl.CanCollide = false | |
44 | dec = Instance.new("Decal",fl) | |
45 | dec.Face = "Front" | |
46 | dec.Texture = "rbxassetid://379128237" | |
47 | dec1 = Instance.new("Decal",fl) | |
48 | dec1.Face = "Back" | |
49 | dec1.Texture = "rbxassetid://379128324" | |
50 | wel = Instance.new("Weld",fl) | |
51 | wel.Part0=fl | |
52 | wel.Part1=player.Character.Torso | |
53 | wel.C0 = CFrame.new(0,2,0) | |
54 | gui=Instance.new("TextBox",bb) | |
55 | gui.Text = "* " | |
56 | gui.Size = UDim2.new(0,266,0,90) | |
57 | ||
58 | gui.Position=UDim2.new(0,94,0,-60) | |
59 | gui.TextColor3 = Color3.new(255,255,255) | |
60 | gui.BackgroundColor3=Color3.new(0,0,0) | |
61 | gui.TextWrapped = true | |
62 | gui.TextScaled = true | |
63 | gui.TextXAlignment = "Left" | |
64 | gui.TextYAlignment = "Top" | |
65 | gui.Visible = false | |
66 | gui.BorderColor3 = Color3.new(0,0,0) | |
67 | ||
68 | gui1=Instance.new("TextButton",bb) | |
69 | gui1.Position=UDim2.new(0,5,0,-66) | |
70 | gui1.Size = UDim2.new(0,380,0,102) | |
71 | ||
72 | gui1.TextColor3 = Color3.new(255,255,255) | |
73 | gui1.BackgroundColor3=Color3.new(255,255,255) | |
74 | ||
75 | gui1.Visible = false | |
76 | img = Instance.new("ImageLabel",bb) | |
77 | img.Size = UDim2.new(0,92,0,94) | |
78 | img.Position = UDim2.new(0,15,0,-62) | |
79 | img.Image = "rbxassetid://340492116" | |
80 | img.BorderColor3 = Color3.new(0,0,0) | |
81 | img.Visible = false | |
82 | sid = "379851665" | |
83 | asd = Instance.new("Sound",player.Character.Torso) | |
84 | asd.SoundId = "http://www.roblox.com/asset/?id =379851665" | |
85 | ||
86 | asd1 = Instance.new("Sound",player.Character.Torso) | |
87 | asd1.SoundId = "http://www.roblox.com/asset/?id =379851665" | |
88 | ||
89 | asd2 = Instance.new("Sound",player.Character.Torso) | |
90 | asd2.SoundId = "http://www.roblox.com/asset/?id = 317393485" | |
91 | asd2.Looped = true | |
92 | asd3 = Instance.new("Sound",player.Character.Torso) | |
93 | asd3.SoundId = "http://www.roblox.com/asset/?id = 316014309" | |
94 | asd3.Looped = true | |
95 | asd4 = Instance.new("Sound",player.Character.Torso) | |
96 | asd4.SoundId = "http://www.roblox.com/asset/?id = 370435986" | |
97 | asd4.Looped = true | |
98 | asd5 = Instance.new("Sound",player.Character.Torso) | |
99 | asd5.SoundId = "http://www.roblox.com/asset/?id = 379865908" | |
100 | asd5.Looped = true | |
101 | asd6 = Instance.new("Sound",player.Character.Torso) | |
102 | asd6.SoundId = "http://www.roblox.com/asset/?id = 379865908" | |
103 | asd7 = Instance.new("Sound",player.Character.Torso) | |
104 | asd7.SoundId = "http://www.roblox.com/asset/?id = 379874748" | |
105 | asd7.Looped = true | |
106 | m.KeyDown:connect(function(k) | |
107 | ||
108 | if k == string.char(50) then | |
109 | if shoot == true then | |
110 | shoot = false | |
111 | b = Instance.new("Part",workspace) | |
112 | b.CFrame = fl.CFrame * CFrame.new(0,0,1) | |
113 | b.BrickColor = BrickColor.new("asd") | |
114 | b.TopSurface = "Universal" | |
115 | b.BottomSurface = "Universal" | |
116 | b.LeftSurface = 0 | |
117 | b.RightSurface = 0 | |
118 | b.FrontSurface = 0 | |
119 | b.BackSurface = 0 | |
120 | b.FormFactor = 3 | |
121 | b.Size = Vector3.new(0.2,0.2,0.5) | |
122 | b.Material = "Neon" | |
123 | b.Anchored = false | |
124 | b.CanCollide = false | |
125 | b.Reflectance = 0 | |
126 | ||
127 | b.Velocity = CFrame.new(b.Position,player:GetMouse().Hit.p).lookVector * 200 | |
128 | b.Touched:connect(function(h) | |
129 | if h.Parent.Name ==game.Players.LocalPlayer.Name then | |
130 | x = h.Parent:findFirstChild("Humanoid") | |
131 | x:TakeDamage(0) | |
132 | else x = h.Parent:findFirstChild("Humanoid") | |
133 | if x then | |
134 | ||
135 | x:TakeDamage(15) | |
136 | ||
137 | ||
138 | ||
139 | end end end) | |
140 | wait(0.3) | |
141 | b:Remove() | |
142 | shoot = true | |
143 | ||
144 | ||
145 | ||
146 | ||
147 | end | |
148 | end | |
149 | end) | |
150 | ||
151 | ||
152 | ||
153 | ||
154 | function play(play) | |
155 | asd:Play() | |
156 | ||
157 | asd1:Play() | |
158 | end | |
159 | eye = Instance.new("Part",player.Character) | |
160 | eye.BrickColor = BrickColor.new("Toothpaste") | |
161 | eye.Material = "Neon" | |
162 | eye.FormFactor = 3 | |
163 | eye.Shape = "Ball" | |
164 | eye.Size = Vector3.new(0.37,0.37,0.1) | |
165 | weld = Instance.new("Weld",eye) | |
166 | weld.Part0 = eye | |
167 | weld.Part1 = player.Character.Head | |
168 | weld.C0 = CFrame.new(0.1,-0.2,0.45) | |
169 | eye.Transparency = 1 | |
170 | -- listen for their chatting | |
171 | player.Chatted:connect(function(message) | |
172 | a = string.len(message) | |
173 | gui.Text = "* " | |
174 | gui.Visible = true | |
175 | gui1.Visible = true | |
176 | des = false | |
177 | img.Visible = true | |
178 | print(a) | |
179 | if dot == false then | |
180 | for i = 1,string.len(message) do wait(aa) | |
181 | gui.Text =gui.Text..message:sub(i,i) | |
182 | play() | |
183 | ||
184 | end | |
185 | end | |
186 | ||
187 | ||
188 | des = true | |
189 | end) | |
190 | m.KeyDown:connect(function(k) | |
191 | if k == "g" then | |
192 | asd2:Play() | |
193 | eye.Transparency = 1 | |
194 | ||
195 | end | |
196 | end) | |
197 | ||
198 | ||
199 | ||
200 | m.KeyDown:connect(function(k) | |
201 | if k == "z" then | |
202 | aa = 0.08 | |
203 | asd1.SoundId = "http://www.roblox.com/asset/?id =379862308" | |
204 | asd.SoundId = "http://www.roblox.com/asset/?id =379862308" | |
205 | img.Image = "rbxassetid://311067910" | |
206 | end | |
207 | end) | |
208 | m.KeyDown:connect(function(k) | |
209 | if k == "c" then | |
210 | aa=0.075 | |
211 | asd1.SoundId = "http://www.roblox.com/asset/?id =379851665" | |
212 | asd.SoundId = "http://www.roblox.com/asset/?id =379851665" | |
213 | img.Image = "rbxassetid://340492116" | |
214 | end | |
215 | end) | |
216 | m.KeyDown:connect(function(k) | |
217 | if k == "n" then | |
218 | sid = "379851665" | |
219 | --img.Image = "rbxassetid://379880202" | |
220 | end | |
221 | end) | |
222 | m.KeyDown:connect(function(k) | |
223 | if k == "b" then | |
224 | --img.Image = "rbxassetid://379866291" | |
225 | end | |
226 | end) | |
227 | m.KeyDown:connect(function(k) | |
228 | if k == "m" then | |
229 | --img.Image = "rbxassetid://379866374" | |
230 | end | |
231 | end) | |
232 | m.KeyDown:connect(function(k) | |
233 | if k == "v" then | |
234 | --img.Image = "rbxassetid://378619540" | |
235 | end | |
236 | end) | |
237 | m.KeyDown:connect(function(k) | |
238 | if k == "k" then | |
239 | asd6:Play() | |
240 | end | |
241 | end) | |
242 | m.KeyDown:connect(function(k) | |
243 | if k == "j" then | |
244 | asd7:Play() | |
245 | end | |
246 | end) | |
247 | ||
248 | m.KeyDown:connect(function(k) | |
249 | if k == "x" then | |
250 | if des == true then | |
251 | gui.Visible = false | |
252 | gui.Text = "* " | |
253 | gui1.Visible = false | |
254 | img.Visible = false | |
255 | end | |
256 | end | |
257 | end) | |
258 | m.KeyDown:connect(function(k) | |
259 | if k == "f" then | |
260 | asd3:Stop() | |
261 | asd2:Stop() | |
262 | asd7:Stop() | |
263 | asd4:Stop() | |
264 | eye.Transparency = 1 | |
265 | asd5:Stop() | |
266 | end | |
267 | end) |