DylanD2003

Untitled

Sep 24th, 2017
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.59 KB | None | 0 0
  1. ------------------
  2. --FIJJET SPINNUH--
  3. ------------------
  4. --By --
  5. --CKbackup-
  6. -----------
  7.  
  8. player = game.Players.LocalPlayer
  9. chara = player.Character
  10. debby = game.Debris
  11. Mouse = player:GetMouse()
  12. rs = game:GetService("RunService").RenderStepped
  13. speedo = 20
  14. mode = "Drop"
  15.  
  16. local s = Instance.new("Sound")
  17.  
  18. s.Name = "Sound"
  19. s.SoundId = "846517858"
  20. s.Volume = 3
  21. s.Looped = true
  22. s.archivable = false
  23.  
  24. s.Parent = game.Workspace
  25.  
  26. wait(0)
  27.  
  28. s:play()
  29.  
  30. --Outfit--
  31. New = function(Object, Parent, Name, Data)
  32. local Object = Instance.new(Object)
  33. for Index, Value in pairs(Data or {}) do
  34. Object[Index] = Value
  35. end
  36. Object.Parent = Parent
  37. Object.Name = Name
  38. return Object
  39. end
  40.  
  41.  
  42. SpinnerWeldBlock = New("Part",chara,"SpinnerWeldBlock",{Transparency = 1,Transparency = 1,Size = Vector3.new(0.600000024, 0.200000003, 0.599999964),CFrame = CFrame.new(-27.7000008, 2.10000014, 9.10000038, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,})
  43. Weld = New("ManualWeld",SpinnerWeldBlock,"Weld",{Part0 = SpinnerWeldBlock,Part1 = chara["Right Arm"],C1 = CFrame.new(-0.200000763, -0.899999619, -0.600000143, 1, 0, 0, 0, 0, 1, -0, -1, -0),})
  44. FIJJETSPINNUH = New("Part",chara,"FIJJETSPINNUH",{BrickColor = BrickColor.new("Bright red"),Size = Vector3.new(1.4000001, 0.200000003, 1.39999998),CFrame = CFrame.new(-27.7000008, 2.10000014, 9.10000038, 1, 0, 0, 0, 1, 0, 0, 0, 1),BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(0.768628, 0.156863, 0.109804),})
  45. FidgetSpinnerMesh = New("SpecialMesh",FIJJETSPINNUH,"FidgetSpinnerMesh",{Offset = Vector3.new(0, 0, -0.135000005),Scale = Vector3.new(3.5, 6, 3.5),MeshId = "rbxassetid://785024366",MeshType = Enum.MeshType.FileMesh,})
  46. SpinnerWeightOverlay = New("Decal",FIJJETSPINNUH,"SpinnerWeightOverlay",{Face = Enum.NormalId.Top,Texture = "rbxassetid://785492382",})
  47. FIJJETSPINNUHWELD = New("ManualWeld",FIJJETSPINNUH,"FIJJETSPINNUHWELD",{Part0 = FIJJETSPINNUH,Part1 = SpinnerWeldBlock,})
  48.  
  49. ScreenGui = New("ScreenGui",player.PlayerGui,"ScreenGui",{})
  50. Frame = New("Frame",ScreenGui,"Frame",{Size = UDim2.new(0, 150, 0, 200),Position = UDim2.new(1,0,.5,0),AnchorPoint = Vector2.new(1,0)})
  51. ColourLabel = New("TextLabel",Frame,"ColourLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Text = "Spinner BrickColor"})
  52. BrickColorBox = New("TextBox",Frame,"BrickColorBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.1,0),Text = "(BrickColor here)"})
  53. TextureBox = New("TextBox",Frame,"TextureBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.3,0),Text = "(Decal ID here)"})
  54. TextureLabel = New("TextLabel",Frame,"TextureLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.2,0),Text = "Spinner Texture"})
  55. RefTraLabel = New("TextLabel",Frame,"RefTraLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.4,0),Text = "Reflect/Transparent"})
  56. ReflectBox = New("TextBox",Frame,"ReflectBox",{Size = UDim2.new(0.4, 0, 0.1, 0),Position = UDim2.new(.1,0,.5,0),Text = "0"})
  57. TransBox = New("TextBox",Frame,"TransBox",{Size = UDim2.new(0.4, 0, 0.1, 0),Position = UDim2.new(.5,0,.5,0),Text = "0"})
  58. SpeedLabel = New("TextLabel",Frame,"SpeedLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.6,0),Text = "Spin Speed"})
  59. SpeedBox = New("TextBox",Frame,"SpeedBox",{Size = UDim2.new(0.8, 0, 0.1, 0),Position = UDim2.new(.1,0,.7,0),Text = "20"})
  60. ModeLabel = New("TextLabel",Frame,"ModeLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.8,0),Text = "Mode (Switch with Q or E)"})
  61. CurrentModeLabel = New("TextLabel",Frame,"CurrentModeLabel",{BackgroundTransparency = 1,BorderSizePixel = 0,Size = UDim2.new(1, 0, 0.1, 0),Position = UDim2.new(0,0,.9,0),Text = "Drop"})
  62. CloseButton = New("TextButton",ScreenGui,"CloseButton",{Size = UDim2.new(0, 50, 0, 25),Position = UDim2.new(),AnchorPoint = Vector2.new(1,1),Position = UDim2.new(1,0,.5,0),Text = "Close"})
  63.  
  64. CloseButton.MouseButton1Click:connect(function()
  65. if Frame.Visible == true then
  66. Frame.Visible = false
  67. CloseButton.Text = "Open"
  68. elseif Frame.Visible == false then
  69. Frame.Visible = true
  70. CloseButton.Text = "Close"
  71. end
  72. end)
  73.  
  74. TextureBox.Changed:connect(function()
  75. FidgetSpinnerMesh.TextureId = TextureBox.Text
  76. end)
  77.  
  78. BrickColorBox.Changed:connect(function()
  79. FIJJETSPINNUH.BrickColor = BrickColor.new(BrickColorBox.Text)
  80. FidgetSpinnerMesh.TextureId = ""
  81. end)
  82.  
  83. ReflectBox.Changed:connect(function()
  84. FIJJETSPINNUH.Reflectance = ReflectBox.Text
  85. end)
  86.  
  87. TransBox.Changed:connect(function()
  88. FIJJETSPINNUH.Transparency = TransBox.Text
  89. end)
  90.  
  91. SpeedBox.Changed:connect(function()
  92. if SpeedBox.Text ~= "" then
  93. speedo = SpeedBox.Text
  94. end
  95. end)
  96.  
  97. function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
  98. local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
  99. local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
  100. local TEff = New("Trail",parent,"TrailEff",{Color = ColorSequence.new({ColorSequenceKeypoint.new(0,BrickColor.new(color1).Color),ColorSequenceKeypoint.new(1,BrickColor.new(color2).Color)}),Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,.5),NumberSequenceKeypoint.new(1,1)}),Attachment0 = Att1,Attachment1 = Att2,Enabled = false,Lifetime = .5,MinLength = .001})
  101. return TEff
  102. end
  103.  
  104. --Clerp Animations--
  105. TC = chara.HumanoidRootPart.RootJoint
  106. HC = chara.Torso.Neck
  107. RAC = chara.Torso["Right Shoulder"]
  108. LAC = chara.Torso["Left Shoulder"]
  109. RLC = chara.Torso["Right Hip"]
  110. LLC = chara.Torso["Left Hip"]
  111. TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  112. HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  113. RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  114. LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  115. RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  116. LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  117. RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  118. LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  119. RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  120. LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  121. RW = Instance.new("Weld",HC.Parent)
  122. RW.Part1 = HC.Parent
  123. RW.Part0 = chara["Right Arm"]
  124. RW.C0 = RWF
  125.  
  126. function clerp(a,b,c)
  127. return a:lerp(b,c)
  128. end
  129.  
  130. --TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  131. --HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
  132. --RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  133. --LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2))
  134.  
  135. RW.C0 = RWF
  136.  
  137. --Idle Clerp--
  138. IRWF = (RWF - Vector3.new(-.2,-.8,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-10),0)
  139.  
  140. function res()
  141. RW.C0 = IRWF
  142. end
  143. res()
  144.  
  145. --Mouse Functions--
  146. function onKeyDown(key)
  147. if key == "q" then
  148. mode = "Drop"
  149. CurrentModeLabel.Text = mode
  150. elseif key == "e" then
  151. mode = "Throw"
  152. CurrentModeLabel.Text = mode
  153. end
  154. end
  155. function onButton1Down()
  156. if mode == "Drop" then
  157. local spinnah = FIJJETSPINNUH:Clone()
  158. spinnah.Parent = workspace
  159. spinnah.Position = FIJJETSPINNUH.Position
  160. spinnah:BreakJoints()
  161. local spinf = Instance.new("BodyAngularVelocity",spinnah)
  162. spinf.AngularVelocity = Vector3.new(0,speedo,0)
  163. spinf.MaxTorque = Vector3.new(speedo,speedo,speedo)
  164. debby:AddItem(spinnah,60)
  165. elseif mode == "Throw" then
  166. local spinnah = FIJJETSPINNUH:Clone()
  167. spinnah.Parent = workspace
  168. spinnah.Position = FIJJETSPINNUH.Position + chara.HumanoidRootPart.CFrame.lookVector*5
  169. spinnah:BreakJoints()
  170. debby:AddItem(spinnah,60)
  171. local spinf = Instance.new("BodyAngularVelocity",spinnah)
  172. spinf.AngularVelocity = Vector3.new(0,speedo,0)
  173. spinf.MaxTorque = Vector3.new(speedo,speedo,speedo)
  174. local faws = Instance.new("BodyForce",spinnah)
  175. faws.Force = Vector3.new(0,spinnah:GetMass()*workspace.Gravity,0)
  176. spinnah.Velocity = chara.HumanoidRootPart.CFrame.lookVector*speedo
  177. spinnah.Touched:connect(function(hit)
  178. if hit.Parent ~= chara and hit.Parent:FindFirstChild("Humanoid") and faws ~= nil then
  179. faws:Destroy()
  180. faws = nil
  181. hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(10,20))
  182. spinf:Destroy()
  183. wait(5)
  184. for i = 0, 1, .1 do
  185. wait(.01)
  186. spinnah.Transparency = i
  187. end
  188. spinnah:Destroy()
  189. end
  190. end)
  191. end
  192. end
  193.  
  194. --Mouse Activation--
  195. if Mouse then
  196. Mouse.KeyDown:connect(onKeyDown)
  197. Mouse.Button1Down:connect(onButton1Down)
  198. end
  199.  
  200. --Loop--
  201. while true do
  202. rs:wait()
  203. FIJJETSPINNUHWELD.C0 = FIJJETSPINNUHWELD.C0 * CFrame.fromEulerAnglesXYZ(0,math.rad(speedo),0)
  204. end
Advertisement
Add Comment
Please, Sign In to add comment