Hugo1234cool

Untitled

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