Advertisement
BAconTUbe

Puns sans Fe

Jan 19th, 2019
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.13 KB | None | 0 0
  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
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153. --// CREATED BY 1x1x1x1IAMbck \\--
  154. --\\ THX TO GOODGUYAIDEN FOR HELPING //--
  155.  
  156. --// Main
  157.  
  158. player = game:GetService("Players").LocalPlayer
  159. chara = player.Character
  160. chara.Humanoid.MaxHealth = 1
  161. chara.Humanoid.Health = 1
  162. debby = game.Debris
  163. wait(1)
  164. plr = game.Players.LocalPlayer
  165. char = plr.Character
  166. mouse = plr:GetMouse()
  167. whitecolor = Color3.new(1,1,1)
  168. epicmode = false
  169. normal = true
  170. local ColorArray = {ColorSequenceKeypoint.new(0, Color3.new(0/0,0/255,0/255)),ColorSequenceKeypoint.new(1, Color3.new(0/0,0/0,0/0))}
  171. local Player = game.Players.LocalPlayer
  172. local Character = Player.Character
  173. local torso = Character.Torso
  174. local hed = Character.Head
  175. local p = game.Players.LocalPlayer
  176. local char = p.Character
  177.  
  178. --// Short keys
  179.  
  180. RArm = Character["Right Arm"]
  181. LArm = Character["Left Arm"]
  182. RLeg = Character["Right Leg"]
  183. LLeg = Character["Left Leg"]
  184.  
  185. --// Sounds
  186.  
  187. local trumpet = Instance.new("Sound",char.Torso)
  188. trumpet.SoundId = "rbxassetid://885599310"
  189. trumpet.Volume = 4
  190. trumpet.Looped = false
  191.  
  192. --// Controls
  193.  
  194. --// Controls \\--
  195.  
  196. if 1 then
  197. local MovesGui=Instance.new("ScreenGui",p:FindFirstChildOfClass("PlayerGui"))
  198. local Frm=Instance.new("Frame",MovesGui)Frm.BackgroundColor3=Color3.new()Frm.BorderSizePixel=0
  199. Frm.BackgroundTransparency=.5 Frm.Size=UDim2.new(.3,0,.5,0)local Show=true Frm.Position=UDim2.new(.7,0,.5,0)
  200. local idk=Instance.new("TextButton",Frm)idk.Size=UDim2.new(.5,0,.1,0)idk.Position=UDim2.new(-.5,0,.8,0)
  201. idk.Text="Hide"idk.TextStrokeTransparency=0 idk.BackgroundTransparency=.5 idk.BackgroundColor3=Color3.new()
  202. idk.BorderSizePixel=0 idk.TextColor3=Color3.new(1,1,1)
  203. idk.MouseButton1Click:connect(function()Show=not Show idk.Text=Show and "Hide"or"Show"end)
  204. local normal=Instance.new("TextLabel",Frm)normal.Size=UDim2.new(1,0,1,0)normal.TextStrokeTransparency=0
  205. normal.BackgroundTransparency=1 normal.TextColor3=Color3.new(1,1,1)
  206. normal.TextXAlignment="Left"normal.TextYAlignment="Top"
  207. normal.Text=[[Hey kiddo... Wanna hear some jokes?
  208. ----------------------------------
  209. *Q : Puns
  210. *E : Puns
  211. *R : Puns
  212. *F : Teleport
  213.  
  214.  
  215. Created By 1x1x1x1IAMbck
  216. Help by GoodGuyAiden
  217. ]]
  218. spawn(function()
  219. while game:service'RunService'.RenderStepped:wait()do
  220. Frm.Position=Frm.Position:lerp(UDim2.new(not Show and 1 or .7,0,.5,0),.1)
  221. end end)
  222. end
  223. --------------------------------------------------------
  224.  
  225.  
  226. --// Destroy and Grab Clothes
  227.  
  228. for i,v in pairs(char:GetChildren()) do
  229. if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "ShirtGraphic" then
  230. v:Destroy()
  231. end
  232. end
  233. local shirt = Instance.new("Shirt",char)
  234. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=302011210"
  235. local pants = Instance.new("Pants",char)
  236. pants.PantsTemplate = "http://www.roblox.com/asset/?id=305718140"
  237. local bdycolors = char["Body Colors"]
  238. bdycolors.HeadColor3 = whitecolor
  239. bdycolors.LeftArmColor3 = whitecolor
  240. bdycolors.LeftLegColor3 = whitecolor
  241. bdycolors.RightArmColor3 = whitecolor
  242. bdycolors.RightLegColor3 = whitecolor
  243. bdycolors.TorsoColor3 = whitecolor
  244. for i,v in pairs(char:GetChildren()) do
  245. if v.ClassName == "Hat" or v.ClassName == "Accessory" then
  246. v:Destroy()
  247. end
  248. end
  249.  
  250. --// Face
  251. char.Head.face.Texture = "http://www.roblox.com/asset/?id=1099475357"
  252.  
  253.  
  254. --// Clothes creation
  255.  
  256. local Hair = char:FindFirstChild("Hair_F") or Instance.new("Hat")
  257. Hair.AttachmentPos = Vector3.new(0, 0.33, 0)
  258. Hair.Name = "Hair_F"
  259. local HairHandle = Hair:FindFirstChild("Handle") or Instance.new("Part", Hair)
  260. if HairHandle.Name ~= "Handle" then
  261. HairHandle.Size = Vector3.new(1,1,1)
  262. end
  263. HairHandle.BottomSurface = 0
  264. HairHandle.Name = "Handle"
  265. HairHandle.TopSurface = 0
  266. HairHandle.Locked = 1
  267. local Mesh = Hair:FindFirstChild("Mesh") or Instance.new("SpecialMesh", HairHandle)
  268. Mesh.TextureId = ""
  269. Mesh.MeshId = "http://www.roblox.com/asset/?id=430073345"
  270. Mesh.TextureId = "http://www.roblox.com/asset/?id=430073362"
  271. Mesh.Scale = Vector3.new(1.1,1.1,1.1)
  272. Mesh.Offset = Vector3.new(0,0,0)
  273. Hair.Parent = Character
  274. HairHandle.BrickColor = BrickColor.new("Really black")
  275. HairHandle.Material = Enum.Material.Granite
  276.  
  277. local tor = Instance.new("CharacterMesh")
  278. tor.Parent = Character
  279. tor.Name = "Bones"
  280. tor.BodyPart = "Torso"
  281. tor.MeshId = "430072717"
  282. tor.OverlayTextureId = "430072723"
  283.  
  284. local tor = Instance.new("CharacterMesh")
  285. tor.Parent = Character
  286. tor.Name = "Bones"
  287. tor.BodyPart = "LeftLeg"
  288. tor.MeshId = "430069778"
  289. tor.OverlayTextureId = "430069795"
  290.  
  291. local tor = Instance.new("CharacterMesh")
  292. tor.Parent = Character
  293. tor.Name = "Bones"
  294. tor.BodyPart = "RightLeg"
  295. tor.MeshId = "430070587"
  296. tor.OverlayTextureId = "430070605"
  297.  
  298. LArm.Transparency = 1
  299. RArm.Transparency = 1
  300. hed.Transparency = 1
  301.  
  302.  
  303.  
  304. New = function(Object, Parent, Name, Data)
  305. local Object = Instance.new(Object)
  306. for Index, Value in pairs(Data or {}) do
  307. Object[Index] = Value
  308. end
  309. Object.Parent = Parent
  310. Object.Name = Name
  311. return Object
  312. end
  313.  
  314. FakeHead = New("Model",chara,"FakeHead",{})
  315. MainPart = New("Part",FakeHead,"MainPart",{BrickColor = BrickColor.new("Institutional white"),Transparency = 1,Size = Vector3.new(2, 1, 1),CFrame = CFrame.new(18, 4.50000381, -6.5, -1, 0, 0, 0, 1, 0, 0, 0, -1),CanCollide = false,Color = Color3.new(0.972549, 0.972549, 0.972549),})
  316. Mesh = New("SpecialMesh",MainPart,"Mesh",{Scale = Vector3.new(1.25, 1.25, 1.25),})
  317. Weld = New("ManualWeld",MainPart,"Weld",{Part0 = MainPart,Part1 = chara.Head,C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),C1 = CFrame.new(0, 3.81469727e-006, 0, -1, 0, 0, 0, 1, 0, 0, 0, -1),})
  318.  
  319. --// Chat \\--
  320.  
  321. local talksound = Instance.new("Sound",char.Torso)
  322. talksound.SoundId = "rbxassetid://928210219"
  323. talksound.Volume = 4
  324. function swait(num)
  325. if num==0 or num==nil then
  326. game:service'RunService'.Stepped:wait(0)
  327. else
  328. for i=0,num do
  329. game:service'RunService'.Stepped:wait(0)
  330. end
  331. end
  332. end
  333.  
  334.  
  335. function chatfunc(text)
  336. local chat = coroutine.wrap(function()
  337. if char:FindFirstChild("TalkingBillBoard") ~= nil then
  338. char:FindFirstChild("TalkingBillBoard"):Destroy()
  339. end
  340. local naeeym2 = Instance.new("BillboardGui",char)
  341. naeeym2.Size = UDim2.new(0,100,0,40)
  342. naeeym2.StudsOffset = Vector3.new(0,3,0)
  343. naeeym2.Adornee = char.Head
  344. naeeym2.Name = "TalkingBillBoard"
  345. local tecks2 = Instance.new("TextLabel",naeeym2)
  346. tecks2.BackgroundTransparency = 1
  347. tecks2.BorderSizePixel = 0
  348. tecks2.Text = ""
  349. tecks2.Font = "Fantasy"
  350. tecks2.TextSize = 30
  351. tecks2.TextStrokeTransparency = 0
  352. tecks2.TextColor3 = Color3.new(.6,0,0)
  353. tecks2.TextStrokeColor3 = Color3.new(0,0,0)
  354. tecks2.Size = UDim2.new(1,0,0.5,0)
  355. local tecks3 = Instance.new("TextLabel",naeeym2)
  356. tecks3.BackgroundTransparency = 1
  357. tecks3.BorderSizePixel = 0
  358. tecks3.Text = ""
  359. tecks3.Font = "Fantasy"
  360. tecks3.TextSize = 30
  361. tecks3.TextStrokeTransparency = 0
  362. tecks3.TextColor3 = Color3.new(0,0,0)
  363. tecks3.TextStrokeColor3 = Color3.new(1,1,1)
  364. tecks3.Size = UDim2.new(1,0,0.5,0)
  365. for i = 1,string.len(text),1 do
  366. tecks2.Text = string.sub(text,1,i)
  367. tecks3.Text = string.sub(text,1,i)
  368. talksound:Play()
  369. wait(0.01)
  370. end
  371. wait(2)
  372. for i = 1, 50 do
  373. swait()
  374. tecks2.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
  375. tecks2.Rotation = tecks2.Rotation - .8
  376. tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
  377. tecks2.TextTransparency = tecks2.TextTransparency + .04
  378. tecks3.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
  379. tecks3.Rotation = tecks2.Rotation + .8
  380. tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
  381. tecks3.TextTransparency = tecks2.TextTransparency + .04
  382. end
  383. naeeym2:Destroy()
  384. end)
  385. chat()
  386. end
  387. function onChatted(msg)
  388. chatfunc(msg)
  389. end
  390. wait(0.5)
  391. chatfunc("Hey kiddo...")
  392. wait(1)
  393. chatfunc("Wanna hear a joke?")
  394. plr.Chatted:connect(onChatted)
  395.  
  396.  
  397. --// Functions
  398.  
  399. local root = char.HumanoidRootPart
  400. function teleport(key)
  401. key = key:lower()
  402. if key == "f" and not teleportlimit then
  403. root.CFrame = CFrame.new(CFrame.new(mouse.Hit.p)*CFrame.new(0,2.8,0).p,root.Position)
  404. wait(0)
  405. end
  406. end
  407. mouse.KeyDown:connect(teleport)
  408.  
  409. function pun1(A)
  410. if A == "q" then
  411. local chatmath = math.random(1,3)
  412. if chatmath == 1 then
  413. chatfunc("Why can't skeletons play church music?")
  414. wait(5)
  415. chatfunc("Because they have no organs.")
  416. end
  417. if chatmath == 2 then
  418. chatfunc("Why are skeletons so calm?")
  419. wait(5)
  420. chatfunc("Because nothing gets under their skin!")
  421. end
  422. if chatmath == 3 then
  423. chatfunc("What does a skeleton order at a restaurant?")
  424. wait(5)
  425. chatfunc("SPARERIBS")
  426. end
  427. end
  428. end
  429. mouse.KeyDown:connect(pun1)
  430.  
  431. function pun2(AA)
  432. if AA == "e" then
  433. local chatmath = math.random(1,3)
  434. if chatmath == 1 then
  435. chatfunc("My favorite instrument?")
  436. wait(5)
  437. chatfunc("the TromBONE, of course.")
  438. wait(0.5)
  439. trumpet:Play()
  440. end
  441. if chatmath == 2 then
  442. chatfunc("What do skeletons hate the most about wind?")
  443. wait(5)
  444. chatfunc("Nothing, it goes right through them.")
  445. end
  446. if chatmath == 3 then
  447. chatfunc("Why don't skeletons fight each other?")
  448. wait(5)
  449. chatfunc("They don't have the guts.")
  450. end
  451. end
  452. end
  453. mouse.KeyDown:connect(pun2)
  454.  
  455. function pun3(AAAA)
  456. if AAAA == "r" then
  457. local chatmath = math.random(1,3)
  458. if chatmath == 1 then
  459. chatfunc("I'm so lazy,")
  460. wait(5)
  461. chatfunc("I'm bone idle!")
  462. end
  463. if chatmath == 2 then
  464. chatfunc("Why did the skeleton want a friend?")
  465. wait(5)
  466. chatfunc("Because she was feeling bonely.")
  467. end
  468. if chatmath == 3 then
  469. chatfunc("What does a skeleton tile his roof with?")
  470. wait(5)
  471. chatfunc("Shin-gles!")
  472. end
  473. end
  474. end
  475. mouse.KeyDown:connect(pun3)
  476.  
  477. --// END? \\--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement