Advertisement
krijnlol

test 1

Jun 14th, 2020
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. local Players = game:GetService("Players")
  2. local player = workspace:WaitForChild("krijnlol")
  3. local player2 = Players:WaitForChild(player.Name)
  4. local head = player:WaitForChild("Head")
  5.  
  6. local eventFolder = Instance.new("Folder", player2:WaitForChild("PlayerScripts"))
  7. eventFolder.Name = "poopScriptEvents"
  8. local keyPressed = Instance.new("RemoteFunction", eventFolder)
  9. keyPressed.Name = "keyPressed"
  10.  
  11. inputModule = NLS([[
  12. local player = script.Parent.Parent
  13. local keyPressed = script.Parent.Parent.PlayerScripts.poopScriptEvents.keyPressed
  14.  
  15. local UserInputService = game:GetService("UserInputService")
  16.  
  17. local function onInputEnded(inputObject, gameProcessedEvent)
  18. -- First check if the 'gameProcessedEvent' is true
  19. -- This indicates that another script had already processed the input, so this one can be ignored
  20. if gameProcessedEvent then return end
  21. -- Next, check that the input was a keyboard event
  22. if inputObject.UserInputType == Enum.UserInputType.Keyboard then
  23. keyPressed:InvokeServer(inputObject.KeyCode.Name)
  24. end
  25. end
  26. UserInputService.InputEnded:Connect(onInputEnded)
  27.  
  28. ]], player2:WaitForChild("PlayerScripts"))
  29.  
  30. local function createPOO()
  31. NewInstance = function(class,parent,properties) pcall(function()
  32. local instance = Instance.new(class,parent)
  33. for i,v in next, properties do
  34. pcall(function()
  35. instance[i] = v
  36. end)
  37. end end)
  38. end Model = Instance.new('Model',workspace) NewInstance("Part",game.Workspace["Model"],{["Shape"] = Enum.PartType.Ball,["FormFactor"] = Enum.FormFactor.Brick,["formFactor"] = Enum.FormFactor.Brick,["Anchored"] = false,["BackParamA"] = -0.5,["BackParamB"] = 0.5,["BackSurface"] = Enum.SurfaceType.Smooth,["BackSurfaceInput"] = Enum.InputType.NoInput,["BottomParamA"] = -0.5,["BottomParamB"] = 0.5,["BottomSurface"] = Enum.SurfaceType.Smooth,["BottomSurfaceInput"] = Enum.InputType.NoInput,["BrickColor"] = BrickColor.new("Burnt Sienna"),["CFrame"] = CFrame.new(head.Position.X, head.Position.Y - 3, head.Position.Z, 1, 0, 0, 0, 1, 0, 0, 0, 1),["CanCollide"] = true,["Elasticity"] = 0.5,["Friction"] = 0.30000001192093,["FrontParamA"] = -0.5,["FrontParamB"] = 0.5,["FrontSurface"] = Enum.SurfaceType.Smooth,["FrontSurfaceInput"] = Enum.InputType.NoInput,["LeftParamA"] = -0.5,["LeftParamB"] = 0.5,["LeftSurface"] = Enum.SurfaceType.Smooth,["LeftSurfaceInput"] = Enum.InputType.NoInput,["Locked"] = false,["Material"] = Enum.Material.Slate,["Reflectance"] = 0,["RightParamA"] = -0.5,["RightParamB"] = 0.5,["RightSurface"] = Enum.SurfaceType.Smooth,["RightSurfaceInput"] = Enum.InputType.NoInput,["RotVelocity"] = Vector3.new(0, 0, 0),["Rotation"] = Vector3.new(0, 0, 0),["Size"] = Vector3.new(1, 1, 1),["TopParamA"] = -0.5,["TopParamB"] = 0.5,["TopSurface"] = Enum.SurfaceType.Smooth,["TopSurfaceInput"] = Enum.InputType.NoInput,["Transparency"] = 0,["Velocity"] = Vector3.new(0, 0, 0),["Archivable"] = true,["Name"] = "1592153257.2347",["archivable"] = true,})
  39.  
  40. return Model
  41. end
  42.  
  43. local Debris = game:GetService("Debris")
  44.  
  45. local function input(kai)
  46. local key = kai.lower()
  47. if key == "c" then
  48. local new = createPOO()
  49. Debris:AddItem(new, 3)
  50. wait(0.25)
  51. end
  52. end
  53.  
  54. keyPressed.OnServerInvoke = input
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement