Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --https://github.com/Mokiros/roblox-FE-compatibility
- 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 V2 by Mokiros")
- local RealPlayer = RealPlayer
- script.Parent = RealPlayer.Character
- --Fake event to make stuff like Mouse.KeyDown work
- local Disconnect_Function = function(this)
- this[1].Functions[this[2]] = nil
- end
- local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
- local FakeEvent_Metatable = {__index={
- Connect = function(this,f)
- local i = tostring(math.random(0,10000))
- while this.Functions[i] do
- i = tostring(math.random(0,10000))
- end
- this.Functions[i] = f
- return setmetatable({this,i},Disconnect_Metatable)
- end
- }}
- FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
- local function fakeEvent()
- return setmetatable({Functions={}},FakeEvent_Metatable)
- end
- --Creating fake input objects with fake variables
- local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
- FakeMouse.keyUp = FakeMouse.KeyUp
- FakeMouse.keyDown = FakeMouse.KeyDown
- 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 TriggerEvent(self,ev,...)
- for _,f in pairs(self[ev].Functions) do
- f(...)
- end
- end
- FakeMouse.TriggerEvent = TriggerEvent
- UIS.TriggerEvent = TriggerEvent
- --Client communication
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=RealPlayer then return end
- FakeMouse.Target = io.Target
- FakeMouse.Hit = io.Hit
- if not io.isMouse then
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
- end
- if io.UserInputType == Enum.UserInputType.MouseButton2 then
- return FakeMouse:TriggerEvent(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
- FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
- local Mouse = owner:GetMouse()
- local UIS = game:GetService("UserInputService")
- local input = function(io,RobloxHandled)
- if RobloxHandled 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 every second frame, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- local HB = game:GetService("RunService").Heartbeat
- while true 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
- --Wait 2 frames
- for i=1,2 do
- HB:Wait()
- end
- end]==],script)
- ----Sandboxed game object that allows the usage of client-side methods and services
- --Real game object
- local RealGame = game
- --Metatable for fake service
- local FakeService_Metatable = {
- __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 RealGame:GetService(RealService) or RealService
- return setmetatable(t,FakeService_Metatable)
- end
- --Fake game object
- local FakeGame = {
- GetService = function(self,s)
- return rawget(self,s) or RealGame:GetService(s)
- end,
- Players = FakeService({
- LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
- },"Players"),
- UserInputService = FakeService(UIS,"UserInputService"),
- ContextActionService = FakeService(CAS,"ContextActionService"),
- RunService = FakeService({
- _btrs = {},
- RenderStepped = RealGame: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(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
- FakeGame.service = FakeGame.GetService
- FakeService(FakeGame,game)
- --Changing owner to fake player object to support owner:GetMouse()
- game,owner = FakeGame,FakeGame.Players.LocalPlayer
- end
- --// CREATED BY 1x1x1x1IAMbck \\--
- --\\ THX TO GOODGUYAIDEN FOR HELPING //--
- --// Main
- player = game:GetService("Players").LocalPlayer
- chara = player.Character
- chara.Humanoid.MaxHealth = 1
- chara.Humanoid.Health = 1
- debby = game.Debris
- wait(1)
- plr = game.Players.LocalPlayer
- char = plr.Character
- mouse = plr:GetMouse()
- whitecolor = Color3.new(1,1,1)
- epicmode = false
- normal = true
- local ColorArray = {ColorSequenceKeypoint.new(0, Color3.new(0/0,0/255,0/255)),ColorSequenceKeypoint.new(1, Color3.new(0/0,0/0,0/0))}
- local Player = game.Players.LocalPlayer
- local Character = Player.Character
- local torso = Character.Torso
- local hed = Character.Head
- local p = game.Players.LocalPlayer
- local char = p.Character
- --// Short keys
- RArm = Character["Right Arm"]
- LArm = Character["Left Arm"]
- RLeg = Character["Right Leg"]
- LLeg = Character["Left Leg"]
- --// Sounds
- local trumpet = Instance.new("Sound",char.Torso)
- trumpet.SoundId = "rbxassetid://885599310"
- trumpet.Volume = 4
- trumpet.Looped = false
- --// Controls
- --// Controls \\--
- if 1 then
- local MovesGui=Instance.new("ScreenGui",p:FindFirstChildOfClass("PlayerGui"))
- local Frm=Instance.new("Frame",MovesGui)Frm.BackgroundColor3=Color3.new()Frm.BorderSizePixel=0
- Frm.BackgroundTransparency=.5 Frm.Size=UDim2.new(.3,0,.5,0)local Show=true Frm.Position=UDim2.new(.7,0,.5,0)
- local idk=Instance.new("TextButton",Frm)idk.Size=UDim2.new(.5,0,.1,0)idk.Position=UDim2.new(-.5,0,.8,0)
- idk.Text="Hide"idk.TextStrokeTransparency=0 idk.BackgroundTransparency=.5 idk.BackgroundColor3=Color3.new()
- idk.BorderSizePixel=0 idk.TextColor3=Color3.new(1,1,1)
- idk.MouseButton1Click:connect(function()Show=not Show idk.Text=Show and "Hide"or"Show"end)
- local normal=Instance.new("TextLabel",Frm)normal.Size=UDim2.new(1,0,1,0)normal.TextStrokeTransparency=0
- normal.BackgroundTransparency=1 normal.TextColor3=Color3.new(1,1,1)
- normal.TextXAlignment="Left"normal.TextYAlignment="Top"
- normal.Text=[[Hey kiddo... Wanna hear some jokes?
- ----------------------------------
- *Q : Puns
- *E : Puns
- *R : Puns
- *F : Teleport
- Created By 1x1x1x1IAMbck
- Help by GoodGuyAiden
- ]]
- spawn(function()
- while game:service'RunService'.RenderStepped:wait()do
- Frm.Position=Frm.Position:lerp(UDim2.new(not Show and 1 or .7,0,.5,0),.1)
- end end)
- end
- --------------------------------------------------------
- --// Destroy and Grab Clothes
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "ShirtGraphic" then
- v:Destroy()
- end
- end
- local shirt = Instance.new("Shirt",char)
- shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=302011210"
- local pants = Instance.new("Pants",char)
- pants.PantsTemplate = "http://www.roblox.com/asset/?id=305718140"
- local bdycolors = char["Body Colors"]
- bdycolors.HeadColor3 = whitecolor
- bdycolors.LeftArmColor3 = whitecolor
- bdycolors.LeftLegColor3 = whitecolor
- bdycolors.RightArmColor3 = whitecolor
- bdycolors.RightLegColor3 = whitecolor
- bdycolors.TorsoColor3 = whitecolor
- for i,v in pairs(char:GetChildren()) do
- if v.ClassName == "Hat" or v.ClassName == "Accessory" then
- v:Destroy()
- end
- end
- --// Face
- char.Head.face.Texture = "http://www.roblox.com/asset/?id=1099475357"
- --// Clothes creation
- local Hair = char:FindFirstChild("Hair_F") or Instance.new("Hat")
- Hair.AttachmentPos = Vector3.new(0, 0.33, 0)
- Hair.Name = "Hair_F"
- local HairHandle = Hair:FindFirstChild("Handle") or Instance.new("Part", Hair)
- if HairHandle.Name ~= "Handle" then
- HairHandle.Size = Vector3.new(1,1,1)
- end
- HairHandle.BottomSurface = 0
- HairHandle.Name = "Handle"
- HairHandle.TopSurface = 0
- HairHandle.Locked = 1
- local Mesh = Hair:FindFirstChild("Mesh") or Instance.new("SpecialMesh", HairHandle)
- Mesh.TextureId = ""
- Mesh.MeshId = "http://www.roblox.com/asset/?id=430073345"
- Mesh.TextureId = "http://www.roblox.com/asset/?id=430073362"
- Mesh.Scale = Vector3.new(1.1,1.1,1.1)
- Mesh.Offset = Vector3.new(0,0,0)
- Hair.Parent = Character
- HairHandle.BrickColor = BrickColor.new("Really black")
- HairHandle.Material = Enum.Material.Granite
- local tor = Instance.new("CharacterMesh")
- tor.Parent = Character
- tor.Name = "Bones"
- tor.BodyPart = "Torso"
- tor.MeshId = "430072717"
- tor.OverlayTextureId = "430072723"
- local tor = Instance.new("CharacterMesh")
- tor.Parent = Character
- tor.Name = "Bones"
- tor.BodyPart = "LeftLeg"
- tor.MeshId = "430069778"
- tor.OverlayTextureId = "430069795"
- local tor = Instance.new("CharacterMesh")
- tor.Parent = Character
- tor.Name = "Bones"
- tor.BodyPart = "RightLeg"
- tor.MeshId = "430070587"
- tor.OverlayTextureId = "430070605"
- LArm.Transparency = 1
- RArm.Transparency = 1
- hed.Transparency = 1
- New = function(Object, Parent, Name, Data)
- local Object = Instance.new(Object)
- for Index, Value in pairs(Data or {}) do
- Object[Index] = Value
- end
- Object.Parent = Parent
- Object.Name = Name
- return Object
- end
- FakeHead = New("Model",chara,"FakeHead",{})
- 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),})
- Mesh = New("SpecialMesh",MainPart,"Mesh",{Scale = Vector3.new(1.25, 1.25, 1.25),})
- 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),})
- --// Chat \\--
- local talksound = Instance.new("Sound",char.Torso)
- talksound.SoundId = "rbxassetid://928210219"
- talksound.Volume = 4
- function swait(num)
- if num==0 or num==nil then
- game:service'RunService'.Stepped:wait(0)
- else
- for i=0,num do
- game:service'RunService'.Stepped:wait(0)
- end
- end
- end
- function chatfunc(text)
- local chat = coroutine.wrap(function()
- if char:FindFirstChild("TalkingBillBoard") ~= nil then
- char:FindFirstChild("TalkingBillBoard"):Destroy()
- end
- local naeeym2 = Instance.new("BillboardGui",char)
- naeeym2.Size = UDim2.new(0,100,0,40)
- naeeym2.StudsOffset = Vector3.new(0,3,0)
- naeeym2.Adornee = char.Head
- naeeym2.Name = "TalkingBillBoard"
- local tecks2 = Instance.new("TextLabel",naeeym2)
- tecks2.BackgroundTransparency = 1
- tecks2.BorderSizePixel = 0
- tecks2.Text = ""
- tecks2.Font = "Fantasy"
- tecks2.TextSize = 30
- tecks2.TextStrokeTransparency = 0
- tecks2.TextColor3 = Color3.new(.6,0,0)
- tecks2.TextStrokeColor3 = Color3.new(0,0,0)
- tecks2.Size = UDim2.new(1,0,0.5,0)
- local tecks3 = Instance.new("TextLabel",naeeym2)
- tecks3.BackgroundTransparency = 1
- tecks3.BorderSizePixel = 0
- tecks3.Text = ""
- tecks3.Font = "Fantasy"
- tecks3.TextSize = 30
- tecks3.TextStrokeTransparency = 0
- tecks3.TextColor3 = Color3.new(0,0,0)
- tecks3.TextStrokeColor3 = Color3.new(1,1,1)
- tecks3.Size = UDim2.new(1,0,0.5,0)
- for i = 1,string.len(text),1 do
- tecks2.Text = string.sub(text,1,i)
- tecks3.Text = string.sub(text,1,i)
- talksound:Play()
- wait(0.01)
- end
- wait(2)
- for i = 1, 50 do
- swait()
- tecks2.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
- tecks2.Rotation = tecks2.Rotation - .8
- tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
- tecks2.TextTransparency = tecks2.TextTransparency + .04
- tecks3.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5))
- tecks3.Rotation = tecks2.Rotation + .8
- tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04
- tecks3.TextTransparency = tecks2.TextTransparency + .04
- end
- naeeym2:Destroy()
- end)
- chat()
- end
- function onChatted(msg)
- chatfunc(msg)
- end
- wait(0.5)
- chatfunc("Hey kiddo...")
- wait(1)
- chatfunc("Wanna hear a joke?")
- plr.Chatted:connect(onChatted)
- --// Functions
- local root = char.HumanoidRootPart
- function teleport(key)
- key = key:lower()
- if key == "f" and not teleportlimit then
- root.CFrame = CFrame.new(CFrame.new(mouse.Hit.p)*CFrame.new(0,2.8,0).p,root.Position)
- wait(0)
- end
- end
- mouse.KeyDown:connect(teleport)
- function pun1(A)
- if A == "q" then
- local chatmath = math.random(1,3)
- if chatmath == 1 then
- chatfunc("Why can't skeletons play church music?")
- wait(5)
- chatfunc("Because they have no organs.")
- end
- if chatmath == 2 then
- chatfunc("Why are skeletons so calm?")
- wait(5)
- chatfunc("Because nothing gets under their skin!")
- end
- if chatmath == 3 then
- chatfunc("What does a skeleton order at a restaurant?")
- wait(5)
- chatfunc("SPARERIBS")
- end
- end
- end
- mouse.KeyDown:connect(pun1)
- function pun2(AA)
- if AA == "e" then
- local chatmath = math.random(1,3)
- if chatmath == 1 then
- chatfunc("My favorite instrument?")
- wait(5)
- chatfunc("the TromBONE, of course.")
- wait(0.5)
- trumpet:Play()
- end
- if chatmath == 2 then
- chatfunc("What do skeletons hate the most about wind?")
- wait(5)
- chatfunc("Nothing, it goes right through them.")
- end
- if chatmath == 3 then
- chatfunc("Why don't skeletons fight each other?")
- wait(5)
- chatfunc("They don't have the guts.")
- end
- end
- end
- mouse.KeyDown:connect(pun2)
- function pun3(AAAA)
- if AAAA == "r" then
- local chatmath = math.random(1,3)
- if chatmath == 1 then
- chatfunc("I'm so lazy,")
- wait(5)
- chatfunc("I'm bone idle!")
- end
- if chatmath == 2 then
- chatfunc("Why did the skeleton want a friend?")
- wait(5)
- chatfunc("Because she was feeling bonely.")
- end
- if chatmath == 3 then
- chatfunc("What does a skeleton tile his roof with?")
- wait(5)
- chatfunc("Shin-gles!")
- end
- end
- end
- mouse.KeyDown:connect(pun3)
- --// END? \\--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement