SimpleZ’s Simple Commands | Created by Seeker4050 (Me) | BETA | Not Finished

SimpleZ’s Simple Commands | Created by Seeker4050 (Me) | BETA | Not Finished

Hello! I am currently creating a module script which simplifies scripting for all users!

For Example, Visualizing a Raycast of a certain direction.

About!

This module is used to simplify scripts which many scripters deal have to deal with, like visualizing a ray like said before. This is usable in 2 ways:

  • Client Sided (Local Scripts)
  • Server Sided (Normal Scripts)

To create your own simplified function you have to write:

1. function SimpleZ.CommandHere(Peremeters)
2.       -- Command Here!
3. end
How to use!

There are 2 ways to use this source:

  1. Copy the code in the Module Script.

Module Script!

  1. Go to this link and add the module to your inventory and copy it in Roblox Studio

Module - By Seeker4050

Module Script!
1. local SimpleZ = {}
2. 	
3. 	local TweenService = game:GetService("TweenService")

4. 	local UIS = game:GetService("UserInputService")

5. 	local TeleportService = game:GetService("TeleportService")
6. 	
7. 	function SimpleZ.Destroy(Obj, Time)
8. 		
9. 		wait(Time)
10. 		
11. 		Obj:Destroy()
12. 		
13. 	end

14. 	function SimpleZ.Interpolate(Obj, Time, Goals)
15. 		
16. 		TweenService:Create(Obj,TweenInfo.new(Time, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, false, 0),Goals):Play()
17. 		
18. 	end

19. 	function SimpleZ.RayCast(Origin, Direction, Visualized, Radius)
20. 		
21. 		if Visualized == true then
22. 			
23. 			local ray = Ray.new(Origin, Direction)
24. 			local Hit, Position = workspace:FindPartOnRay(ray)
25. 			local Distance = (Origin - Position).Magnitude
26. 			
27. 			local Part = Instance.new("Part")
28. 			
29. 			Part.Name = "Visualized Ray"
30. 			Part.Anchored = true
31. 			Part.CanCollide = false
32. 			Part.Parent = game.Workspace
33. 			
34. 			Part.Material = "Neon"
35. 			Part.BrickColor = BrickColor.new("Really red")
36. 			
37. 			Part.Size = Vector3.new(Radius, Radius, Distance)
38. 			Part.CFrame = CFrame.lookAt(Position, Origin) * CFrame.new(0, 0, -Distance/2)
39. 		
40. 			local HitPart = Hit
41. 			local Pos = Position
42. 			
43. 			return HitPart, Pos, Part
44. 			
45. 		else
46. 			
47. 			local ray = Ray.new(Origin, Direction)
48. 			local Hit, Position = workspace:FindPartOnRay(ray)
49. 			
50. 			local HitPart = Hit
51. 			local Pos = Position
52. 			
53. 			return HitPart, Pos
54. 			
55. 		end
56. 		
57. 	end 

58. 	function Animate(Humanoid, Animation)
59. 		
60. 		local Ani = Humanoid:LoadAnimation(Animation)
61. 		Ani:Play()
62. 		
63. 	end
64. 	
65. 	function SimpleZ.Kick(Player, Message)
66. 		
67. 		if Player and Message then
68. 			
69. 			Player:Kick(Message)
70. 			
71. 		elseif Player then
72. 			
73. 			Player:Kick()
74. 			
75. 		end
76. 		
77. 	end

78. 	function SimpleZ.Move(Obj, Vector, Relative)
79. 		
80. 		if Relative == true then
81. 			
82. 			Obj.Position = Obj.Position + Vector
83. 			
84. 		else
85. 			
86. 			Obj.Position = Vector
87. 			
88. 		end
89. 	
90. 	
91. 	end

92. 	function SimpleZ.Rotate(Obj, Vector, Relative)

93. 		if Relative == true then

94. 			Obj.Orientation = Obj.Orientation + Vector

95. 		else

96. 			Obj.Orientation = Vector

97. 		end

98. 	end

99. 	function SimpleZ.FowardMove(Obj, Amount)
100. 		
101. 		Obj.Position = Obj.Position + Obj.CFrame.LookVector * Amount
102. 		
103. 	end

104. 	function SimpleZ.PointTowards(Part, Position, Offset)
105. 		
106. 		Part.CFrame = CFrame.lookAt(Part.Position, Position + Offset)
107. 		
108. 	end

109. 	function SimpleZ.TeleportPlace(Player, PlaceID)
110. 		
111. 		TeleportService:Teleport(PlaceID, Player)
112. 		
113. 		print("Teleporting " .. tostring(Player) .. " to " .. tostring(PlaceID))
114. 		
115. 	end
116. 	
117. 	function SimpleZ.TeleportBlock(Char, TargetPosition, Offset)
118. 		
119. 		Char:MoveTo(TargetPosition + Offset)
120. 		
121. 	end

122. return SimpleZ
Commands
  1. Destroy(Obj, Time)
    Destroys selected part in optional Time.

  2. Interpolate(Obj, Time, Goals)
    Similar to Tweening, Interpolates selected part in a set of goals (Must be in a table) in a particular time.

  3. RayCast(Origin, Direction, Visualized, Radius)
    Raycasts a ray of a origin and direction. You can choose to be Visualized (true or false) with a radius.

  4. Kick(Player, Message)
    Kicks the player with an message. (Optional)

  5. Move(Obj, Vector, Relative)
    Moves the part to or by an vector3, Depends if relative (true or false)

  6. Rotate(Obj, Vector, Relative)
    Rotates the part to or by an vector3, Depends if relative (true or false)

  7. FowardMove(Obj, Amount)
    Moves an object by the forward movement (LookVector) with an Amount.

  8. PointTowards(Part, Position, Offset)
    Makes a part point towards and position with an Offset (Required)

  9. TeleportPlace(Player, PlaceID)
    Teleports the player to another place with the PlaceID (Required)

  10. TeleportBlock(Char, TargetPosition, Offset)
    Teleports the player character to another position with an offset (Required)

  11. Animate(Humanoid, Animation)
    Animates an humanoid with an animation (Not the animationID)

Feel free to list more complicated commands so I can simplify it or commands that should be simplified!

… Everything is uh… mostly in the drop-downs… :confused:

Is my first published Module btw.

1 Like