zombieslayerwtf

spinner

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