Advertisement
vL4d_4eVer

Rainbow Ghost

Apr 22nd, 2018
622
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.86 KB | None | 0 0
  1. ----//  Raibow Ghost by vlad20020.  \\----
  2. ----||                                        ||----
  3. ----\\Do not use with other scripts.//----
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8.     print("FE Compatibility code by Mokiros")
  9.     script.Parent = Player.Character
  10.  
  11.     --RemoteEvent for communicating
  12.     local Event = Instance.new("RemoteEvent")
  13.     Event.Name = "UserInput_Event"
  14.  
  15.     --Fake event to make stuff like Mouse.KeyDown work
  16.     local function fakeEvent()
  17.         local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  18.         t.connect = t.Connect
  19.         return t
  20.     end
  21.  
  22.     --Creating fake input objects with fake variables
  23.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  24.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  25.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  26.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  27.     end}
  28.     --Merged 2 functions into one by checking amount of arguments
  29.     CAS.UnbindAction = CAS.BindAction
  30.  
  31.     --This function will trigger the events that have been :Connect()'ed
  32.     local function te(self,ev,...)
  33.         local t = m[ev]
  34.         if t and t._fakeEvent and t.Function then
  35.             t.Function(...)
  36.         end
  37.     end
  38.     m.TrigEvent = te
  39.     UIS.TrigEvent = te
  40.  
  41.     Event.OnServerEvent:Connect(function(plr,io)
  42.         if plr~=Player then return end
  43.         m.Target = io.Target
  44.         m.Hit = io.Hit
  45.         if not io.isMouse then
  46.             local b = io.UserInputState == Enum.UserInputState.Begin
  47.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49.             end
  50.             for _,t in pairs(CAS.Actions) do
  51.                 for _,k in pairs(t.Keys) do
  52.                     if k==io.KeyCode then
  53.                         t.Function(t.Name,io.UserInputState,io)
  54.                     end
  55.                 end
  56.             end
  57.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59.         end
  60.     end)
  61.     Event.Parent = NLS([==[
  62.     local Player = game:GetService("Players").LocalPlayer
  63.     local Event = script:WaitForChild("UserInput_Event")
  64.  
  65.     local Mouse = Player:GetMouse()
  66.     local UIS = game:GetService("UserInputService")
  67.     local input = function(io,a)
  68.         if a then return end
  69.         --Since InputObject is a client-side instance, we create and pass table instead
  70.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71.     end
  72.     UIS.InputBegan:Connect(input)
  73.     UIS.InputEnded:Connect(input)
  74.  
  75.     local h,t
  76.     --Give the server mouse data 30 times every second, but only if the values changed
  77.     --If player is not moving their mouse, client won't fire events
  78.     while wait(1/30) do
  79.         if h~=Mouse.Hit or t~=Mouse.Target then
  80.             h,t=Mouse.Hit,Mouse.Target
  81.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  82.         end
  83.     end]==],Player.Character)
  84.     local _rg = game
  85.     local function FakeService(t,RealService)
  86.         t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  87.         return setmetatable(t,{
  88.             __index = function(self,k)
  89.                 local s = rawget(self,"_RealService")
  90.                 if s then return s[k] end
  91.             end,
  92.             __newindex = function(self,k,v)
  93.                 local s = rawget(self,"_RealService")
  94.                 if s then s[k]=v end
  95.             end,
  96.         })
  97.     end
  98.     local g = FakeService({
  99.         GetService = function(self,s)
  100.             return self[s]
  101.         end,
  102.         Players = FakeService({
  103.             LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  104.         },"Players"),
  105.         UserInputService = FakeService(UIS,"UserInputService"),
  106.         ContextActionService = FakeService(CAS,"ContextActionService"),
  107.         RunService = FakeService({RenderStepped=game:GetService("RunService").Heartbeat},"RunService")
  108.     },game)
  109.     rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  110.     getmetatable(g).__index=function(self,s)
  111.         return _rg:GetService(s) or typeof(_rg[s])=="function"
  112.         and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  113.     end
  114.     game = g
  115.     owner = g.Players.LocalPlayer
  116. end
  117. local plr = game:GetService("Players").LocalPlayer
  118. local char = plr.Character
  119. local la = char["Left Arm"]
  120. local ll = char["Left Leg"]
  121. local ra = char["Right Arm"]
  122. local rl = char["Right Leg"]
  123. local h = char.Head
  124. local t = char.Torso
  125. local hum = char.Humanoid
  126. local So = Instance.new("Sound", h)
  127. mouse = plr:GetMouse()
  128. hum.Changed:connect(function()
  129. hum.MaxHealth = 100 hum.Health = 100
  130. end)
  131. print('Made by vlad20020, for you '..plr.Name)
  132. warn"E = Invisiblity"
  133. So.Name = "GETDEFUCOUT"
  134. So.SoundId = "http://www.roblox.com/asset?id=885996042"
  135. So.Looped = true
  136. So.Volume = 1
  137. So:Play()
  138. me = Instance.new("SpecialMesh",t)
  139. me.MeshType = "Brick"
  140. me1 = Instance.new("SpecialMesh",ra)
  141. me1.MeshType = "Brick"
  142. me2 = Instance.new("SpecialMesh",la)
  143. me2.MeshType = "Brick"
  144. me3 = Instance.new("SpecialMesh",rl)
  145. me3.MeshType = "Brick"
  146. me4 = Instance.new("SpecialMesh",ll)
  147. me4.MeshType = "Brick"
  148. h.Size = Vector3.new(1,1,1)
  149. h.Mesh:Destroy()
  150. hum.DisplayDistanceType = "None"
  151. h.Transparency = .5
  152. t.Transparency = .5
  153. la.Transparency = .5
  154. ll.Transparency = .5
  155. rl.Transparency = .5
  156. ra.Transparency = .5
  157. hum.MaxHealth = math.huge
  158. hum.Health = math.huge
  159. hum.WalkSpeed = 100
  160. hum.JumpPower = 100
  161. ra.Material = "Neon"
  162. la.Material = "Neon"
  163. rl.Material = "Neon"
  164. ll.Material = "Neon"
  165. h.Material = "Neon"
  166. t.Material = "Neon"
  167. for _,v in pairs(h:GetChildren()) do
  168.     if v:IsA("Decal") then
  169.         v:Destroy()
  170.     end
  171. end
  172. for _,v in pairs(char:GetChildren()) do
  173.     if v:IsA("Accessory") then
  174.         v:Destroy()
  175.     end
  176. end
  177. mouse.KeyDown:connect(function(key)
  178.         if key == "e" then
  179.             h.Transparency = 0
  180.                 t.Transparency = 0
  181.                 ra.Transparency = 0
  182.                 la.Transparency = 0
  183.                 rl.Transparency = 0
  184.                 ll.Transparency = 0
  185.                 wait(.1)
  186.                 h.Transparency = 1
  187.                 t.Transparency = 1
  188.                 ra.Transparency = 1
  189.                 la.Transparency = 1
  190.                 rl.Transparency = 1
  191.                 ll.Transparency = 1
  192.                 h.CanCollide = false
  193.                 t.CanCollide = false
  194.                 ra.CanCollide = false
  195.                 la.CanCollide = false
  196.                 rl.CanCollide = false
  197.                 ll.CanCollide = false
  198.                 hum.WalkSpeed = 100
  199.                 hum.JumpPower = 150
  200.         end
  201. end)
  202. mouse.KeyUp:connect(function(key)
  203.         if key == "e" then
  204.                 h.Transparency = 0
  205.                 h.Transparency = 0
  206.                 ra.Transparency = 0
  207.                 la.Transparency = 0
  208.                 rl.Transparency = 0
  209.                 ll.Transparency = 0
  210.                 wait(.1)
  211.                 t.Transparency = .5
  212.                 ra.Transparency = .5
  213.                 la.Transparency = .5
  214.                 rl.Transparency = .5
  215.                 ll.Transparency = .5
  216.             h.Transparency = .5
  217.                 h.CanCollide = true
  218.                 t.CanCollide = true
  219.                 ra.CanCollide = true
  220.                 la.CanCollide = true
  221.                 rl.CanCollide = true
  222.                 ll.CanCollide = true
  223.                 hum.WalkSpeed = 50
  224.                 hum.JumpPower = 100
  225.         end
  226. end)
  227. function onTouched(hit)
  228. hit:BreakJoints()
  229. end
  230. function kiss(hit1)
  231. hit1.Anchored = false
  232. end
  233. h.Touched:connect(onTouched)
  234. t.Touched:connect(onTouched)
  235. la.Touched:connect(onTouched)
  236. ra.Touched:connect(onTouched)
  237. ll.Touched:connect(onTouched)
  238. ra.Touched:connect(onTouched)
  239. t.Touched:connect(kiss)
  240. h.Touched:connect(kiss)
  241. ra.Touched:connect(kiss)
  242. la.Touched:connect(kiss)
  243. rs = char.Torso["Right Shoulder"]
  244. ls = char.Torso["Left Shoulder"]
  245. rh = char.Torso["Right Hip"]
  246. lh = char.Torso["Left Hip"]
  247. rut = char.HumanoidRootPart
  248. rutj = rut.RootJoint
  249. --------------------------
  250. local tweens = game:GetService("TweenService")
  251.  
  252. local tweeni = TweenInfo.new(
  253.         1,
  254.         Enum.EasingStyle.Linear,
  255.         Enum.EasingDirection.InOut,
  256.         0,
  257.         true,
  258.         0
  259. )
  260. local red = {Color = Color3.fromRGB(255,0,0)}
  261. local orange = {Color = Color3.fromRGB(255,160,0)}
  262. local yellow = {Color = Color3.fromRGB(255,255,0)}
  263. local green = {Color = Color3.fromRGB(0,255,0)}
  264. local cyan = {Color = Color3.fromRGB(0,255,255)}
  265. local blue = {Color = Color3.fromRGB(0,0,255)}
  266. local purple = {Color = Color3.fromRGB(100,0,255)}
  267.  
  268. local tred = tweens:Create(h,tweeni,red)
  269. local tred1 = tweens:Create(t,tweeni,red)
  270. local tred2 = tweens:Create(ra,tweeni,red)
  271. local tred3 = tweens:Create(la,tweeni,red)
  272. local tred4 = tweens:Create(rl,tweeni,red)
  273. local tred5 = tweens:Create(ll,tweeni,red)
  274.  
  275. local torange = tweens:Create(h,tweeni,orange)
  276. local torange1 = tweens:Create(t,tweeni,orange)
  277. local torange2 = tweens:Create(ra,tweeni,orange)
  278. local torange3 = tweens:Create(rl,tweeni,orange)
  279. local torange4 = tweens:Create(la,tweeni,orange)
  280. local torange5 = tweens:Create(ll,tweeni,orange)
  281.  
  282. local tyellow = tweens:Create(h,tweeni,yellow)
  283. local tyellow1 = tweens:Create(t,tweeni,yellow)
  284. local tyellow2 = tweens:Create(ra,tweeni,yellow)
  285. local tyellow3 = tweens:Create(rl,tweeni,yellow)
  286. local tyellow4 = tweens:Create(la,tweeni,yellow)
  287. local tyellow5 = tweens:Create(ll,tweeni,yellow)
  288.  
  289. local tgreen = tweens:Create(h,tweeni,green)
  290. local tgreen1 = tweens:Create(t,tweeni,green)
  291. local tgreen2 = tweens:Create(ra,tweeni,green)
  292. local tgreen3 = tweens:Create(rl,tweeni,green)
  293. local tgreen4 = tweens:Create(la,tweeni,green)
  294. local tgreen5 = tweens:Create(ll,tweeni,green)
  295.  
  296. local tcyan = tweens:Create(h,tweeni,cyan)
  297. local tcyan1 = tweens:Create(t,tweeni,cyan)
  298. local tcyan2 = tweens:Create(ra,tweeni,cyan)
  299. local tcyan3 = tweens:Create(rl,tweeni,cyan)
  300. local tcyan4 = tweens:Create(la,tweeni,cyan)
  301. local tcyan5 = tweens:Create(ll,tweeni,cyan)
  302.  
  303. local tblue = tweens:Create(h,tweeni,blue)
  304. local tblue1 = tweens:Create(t,tweeni,blue)
  305. local tblue2 = tweens:Create(ra,tweeni,blue)
  306. local tblue3 = tweens:Create(rl,tweeni,blue)
  307. local tblue4 = tweens:Create(la,tweeni,blue)
  308. local tblue5 = tweens:Create(ll,tweeni,blue)
  309.  
  310. local tpurple = tweens:Create(h,tweeni,purple)
  311. local tpurple1 = tweens:Create(t,tweeni,purple)
  312. local tpurple2 = tweens:Create(ra,tweeni,purple)
  313. local tpurple3 = tweens:Create(rl,tweeni,purple)
  314. local tpurple4 = tweens:Create(la,tweeni,purple)
  315. local tpurple5 = tweens:Create(ll,tweeni,purple)
  316.  
  317. while wait(1) do
  318.     t.CanCollide = false
  319.     h.CanCollide = false
  320.     tred:Play()
  321.     tred1:Play()
  322.     tred2:Play()
  323.     tred3:Play()
  324.     tred4:Play()
  325.     tred5:Play()
  326.     wait(1)
  327.     t.CanCollide = false
  328.     h.CanCollide = false
  329.     torange:Play()
  330.     torange1:Play()
  331.     torange2:Play()
  332.     torange3:Play()
  333.     torange4:Play()
  334.     torange5:Play()
  335.     wait(1)
  336.     t.CanCollide = false
  337.     h.CanCollide = false
  338.     tyellow:Play()
  339.     tyellow1:Play()
  340.     tyellow2:Play()
  341.     tyellow3:Play()
  342.     tyellow4:Play()
  343.     tyellow5:Play()
  344.     wait(1)
  345.     t.CanCollide = false
  346.     h.CanCollide = false
  347.     tgreen:Play()
  348.     tgreen1:Play()
  349.     tgreen2:Play()
  350.     tgreen3:Play()
  351.     tgreen4:Play()
  352.     tgreen5:Play()
  353.     wait(1)
  354.     t.CanCollide = false
  355.     h.CanCollide = false
  356.     tcyan:Play()
  357.     tcyan1:Play()
  358.     tcyan2:Play()
  359.     tcyan3:Play()
  360.     tcyan4:Play()
  361.     tcyan5:Play()
  362.     wait(1)
  363.     t.CanCollide = false
  364.     h.CanCollide = false
  365.     tblue:Play()
  366.     tblue1:Play()
  367.     tblue2:Play()
  368.     tblue3:Play()
  369.     tblue4:Play()
  370.     tblue5:Play()
  371.     wait(1)
  372.     t.CanCollide = false
  373.     h.CanCollide = false
  374.     tpurple:Play()
  375.     tpurple1:Play()
  376.     tpurple2:Play()
  377.     tpurple3:Play()
  378.     tpurple4:Play()
  379.     tpurple5:Play()
  380. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement