Upscalefanatic3

Label on top of your head and turns you into a black ghost

Mar 14th, 2019
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.37 KB | None | 0 0
  1. plr =owner
  2. -- This script has been converted to FE by iPxter
  3.  
  4.  
  5. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  6. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  7. do
  8. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  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. if io.isMouse then
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. else
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. for _,t in pairs(CAS.Actions) do
  52. for _,k in pairs(t.Keys) do
  53. if k==io.KeyCode then
  54. t.Function(t.Name,io.UserInputState,io)
  55. end
  56. end
  57. end
  58. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  59. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  60. end
  61. end)
  62. Event.Parent = NLS([==[
  63. local Player = game:GetService("Players").LocalPlayer
  64. local Event = script:WaitForChild("UserInput_Event")
  65.  
  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})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  75. local Mouse = Player:GetMouse()
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  86. end
  87. part = nil
  88. bp = nil
  89. particles = nil
  90. function clerp(a,b,c,d)
  91. for i = 0,d,.01 do
  92. a.CFrame = CFrame.new(b:lerp(c,i))
  93. wait()
  94. end
  95. end
  96. function slerp(a2,b2,c2,d2)
  97. for i2 = 0,d2,.01 do
  98. a2.CFrame = CFrame.new(b2:lerp(c2,i2))
  99. wait()
  100. end
  101. end
  102. mouse.KeyDown:connect(function(key)
  103. if key == "e" and plr.Character.Parent == workspace then
  104. plr.Character.Parent = workspace.Camera
  105. plr.Character.Archivable = true
  106. Instance.new("ForceField",plr.Character).Visible = false
  107. for y,t in pairs(plr.Character:GetChildren()) do
  108. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  109. t.Transparency = 1
  110. if t.Name == "Head" and t:FindFirstChild("face") then
  111. t.face.Transparency = 1
  112. end
  113. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  114. t.Handle.Transparency = 1
  115. end
  116. end
  117. elseif key == "z" and plr.Character.Parent == workspace.Camera and part == nil then
  118. plr.Character.Torso.CFrame = CFrame.new(Vector3.new(mouse.hit.p.X,mouse.hit.p.Y+1.5,mouse.hit.p.Z),plr.Character.Torso.CFrame.p)
  119. elseif key == "x" and plr.Character.Parent == workspace.Camera and part == nil then
  120. if plr.Character.Torso.Anchored == true then
  121. for y,t in pairs(plr.Character:GetChildren()) do
  122. if t:IsA("Part") then
  123. t.Anchored = false
  124. end
  125. end
  126. else
  127. for y,t in pairs(plr.Character:GetChildren()) do
  128. if t:IsA("Part") then
  129. t.Anchored = true
  130. end
  131. end
  132. end
  133. elseif key == "c" and plr.Character.Parent == workspace.Camera and part ~= nil then
  134. local clone = part:Clone()
  135. clone.Parent = workspace
  136. clone.Anchored = false
  137. clone:ClearAllChildren()
  138. clone.CanCollide = true
  139. bp.Parent = clone
  140. particles.Parent = clone
  141. if part.Parent:FindFirstChildOfClass("Humanoid") then
  142. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false
  143. end
  144. part:Destroy()
  145. part = clone
  146. elseif key == "t" and plr.Character.Parent == workspace.Camera and part == nil then
  147. plr.Character.Parent = workspace
  148. plr.Character.Archivable = false
  149. plr.Character:FindFirstChildOfClass("ForceField"):Remove()
  150. for y,t in pairs(plr.Character:GetChildren()) do
  151. if t:IsA("Part") and t.Name ~= "HumanoidRootPart" then
  152. t.Transparency = 0
  153. if t.Name == "Head" and t:FindFirstChild("face") then
  154. t.face.Transparency = 0
  155. end
  156. elseif t:IsA("Accessory") and t:FindFirstChild("Handle") then
  157. t.Handle.Transparency = 0
  158. end
  159. end
  160. end
  161. end)
  162. mouse.Button1Down:connect(function()
  163. if plr.Character.Parent == workspace.Camera then
  164. if mouse ~= nil then
  165. if mouse.Target ~= nil then
  166. part = mouse.Target
  167. bp = Instance.new("BodyPosition",part)
  168. bp.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  169. bp.Position = part.Position
  170. particles = Instance.new("ParticleEmitter",part)
  171. particles.Color = ColorSequence.new(Color3.new(0,0,0))
  172. particles.Size = NumberSequence.new(1)
  173. particles.Texture = "rbxassetid://292289455"
  174. particles.VelocitySpread = 360
  175. particles.Speed = NumberRange.new(0)
  176. particles.RotSpeed = NumberRange.new(0)
  177. particles.Rotation = NumberRange.new(0)
  178. particles.Rate = 250
  179. particles.Lifetime = NumberRange.new(.2,.4)
  180. particles.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1,0),NumberSequenceKeypoint.new(.12,.688,0),NumberSequenceKeypoint.new(.891,.887,0),NumberSequenceKeypoint.new(1,1,0)})
  181. dwn = true
  182. end
  183. end
  184. while dwn == true do
  185. wait()
  186. bp.Position = mouse.hit.p
  187. if part then
  188. if part.Parent:FindFirstChildOfClass("Humanoid") then
  189. part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
  190. end
  191. end
  192. end
  193. end
  194. end)
  195. mouse.Button1Up:connect(function()
  196. dwn = false
  197. if part then if part.Parent:FindFirstChildOfClass("Humanoid") then part.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = false end part = nil end
  198. if bp then bp:Destroy() end
  199. if particles then particles:Destroy() end
  200. end)
  201. base = Instance.new("ScreenGui",plr.PlayerGui)
  202. bbg = Instance.new("BillboardGui",plr.Character.Head)
  203. bbg.Size = UDim2.new(0,200,0,50)
  204. bbg.StudsOffset = Vector3.new(0,3,0)
  205. bbgTl = Instance.new("TextLabel",bbg)
  206. bbgTl.BackgroundTransparency = 1
  207. bbgTl.Size = UDim2.new(10,0,1,0)
  208. bbgTl.Position = UDim2.new(-4.5,0,0,0)
  209. bbgTl.Font = "Code"
  210. bbgTl.Text = " "
  211. bbgTl.TextSize = 25
  212. bbgTl.TextStrokeColor3 = Color3.new(1,1,1)
  213. bbgTl.TextColor3 = Color3.new(0,0,0)
  214. bbgTl.TextStrokeTransparency = 0
  215. bbgTl.TextWrapped = true
  216. plr.Chatted:connect(function(msg)
  217. bbgTl.Text = msg
  218. wait(5)
  219. if bbgTl.Text == msg then
  220. bbgTl.Text = " "
  221. end
  222. end)
  223. touchCounter = 0
  224. while wait() do
  225. if plr.Character.Parent == workspace.Camera then
  226. local c = plr.Character:Clone()
  227. c:MakeJoints()
  228. for y,t in pairs(c:GetChildren()) do
  229. if t:IsA("Part") then
  230. t.CanCollide = false
  231. t.Anchored = true
  232. t.Transparency = .5
  233. t.TopSurface = "Smooth"
  234. t.BottomSurface = "Smooth"
  235. t.RightSurface = "Smooth"
  236. t.LeftSurface = "Smooth"
  237. t.FrontSurface = "Smooth"
  238. t.BackSurface = "Smooth"
  239. t.BrickColor = BrickColor.new("Really black")
  240. if t.Name == "Head" and t:FindFirstChild("face") then
  241. t.face:Remove()
  242. elseif t.Name == "Torso" and t:FindFirstChild("roblox") then
  243. t.roblox:Remove()
  244. elseif t.Name == "HumanoidRootPart" then
  245. t:Remove()
  246. end
  247. else
  248. t:Remove()
  249. end
  250. end
  251. c.Parent = workspace
  252. game.Debris:AddItem(c,.05)
  253. end
  254. end
Add Comment
Please, Sign In to add comment